Don't display "closing http server" notice when the server is not running

This commit is contained in:
Simon Cambier
2024-01-23 07:51:32 +01:00
parent 4b8bf437ce
commit 6424d6f7b9

View File

@@ -63,7 +63,7 @@ export function getServer() {
close() {
server.close()
console.log(`Omnisearch - Terminated HTTP server`)
if (settings.httpApiNotice) {
if (settings.httpApiEnabled && settings.httpApiNotice) {
new Notice(`Omnisearch - Terminated HTTP server`)
}
},