Prevent searchless crashing
This commit is contained in:
parent
ff496892d7
commit
a55036e7d0
3 changed files with 9 additions and 9 deletions
14
index.js
14
index.js
|
@ -140,10 +140,10 @@ app.get("/search", async (req, res) => {
|
||||||
res.write(addedHTML + html.substring(html.indexOf("{RESULTS}") + 9), () => {res.end()})
|
res.write(addedHTML + html.substring(html.indexOf("{RESULTS}") + 9), () => {res.end()})
|
||||||
})
|
})
|
||||||
|
|
||||||
// process.on('uncaughtException', (err, origin) => {
|
process.on('uncaughtException', (err, origin) => {
|
||||||
// fs.writeSync(
|
fs.writeSync(
|
||||||
// process.stderr.fd,
|
process.stderr.fd,
|
||||||
// `Caught exception: ${err}\n` +
|
`Caught exception: ${err}\n` +
|
||||||
// `Exception origin: ${origin}`,
|
`Exception origin: ${origin}`,
|
||||||
// );
|
);
|
||||||
// });
|
});
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<form action="/search">
|
<form action="/search">
|
||||||
<input type="text" placeholder="Search" name="q">
|
<input required type="text" placeholder="Search" name="q">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<form action="/search">
|
<form action="/search">
|
||||||
<input type="text" placeholder="Search" name="q" value="{SEARCH}">
|
<input required type="text" placeholder="Search" name="q" value="{SEARCH}">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue