stringify did-fail-load error

directly preload front-logger
simplify front-logger
This commit is contained in:
Araxeus
2021-05-04 01:22:47 +03:00
parent 8f766bcbaa
commit d5b9e3c960
3 changed files with 7 additions and 10 deletions

View File

@ -1,11 +1,9 @@
const { ipcRenderer } = require("electron");
function logToString(log) {
let string = (typeof log === "string") ? log : log.toString();
if (!string || string.includes("[object Object]")) {
string = JSON.stringify(log, null, "\t");
}
return string;
return (typeof log === "string") ?
log :
JSON.stringify(log, null, "\t");
}
module.exports = () => {