diff --git a/macros/14-persist.js b/macros/14-persist.js index 67dc1cd..effef0f 100644 --- a/macros/14-persist.js +++ b/macros/14-persist.js @@ -39,8 +39,8 @@ async function read() { // Parse contents try { + let data = contents !== '' ? JSON.parse(contents) : ''; console.debug(`DB contains: ${contents}`); - let data = JSON.parse(contents); console.debug('DB successfully parsed'); return data; }