fix hide-menu timing + minify log function

This commit is contained in:
Araxeus
2021-04-05 04:04:29 +03:00
parent 11bd1adbd4
commit 6472002f8a
2 changed files with 27 additions and 21 deletions

View File

@ -3,12 +3,9 @@ const { ipcRenderer } = require("electron");
module.exports = () => {
ipcRenderer.on("log", (event, log) => {
let string = log.toString() || log;
if (string) {
console.log(string);
} else {
for (let propery of log) {
console.log(propery.toString() || propery);
}
}
if (!string || string === "[object Object]") {
string = JSON.stringify(log);
}
console.log(string);
})
}
};