From 66ac78fee0cca2d9cd3130a2b3bc501f1d3c3d54 Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Wed, 20 Dec 2017 21:03:57 -0500 Subject: [PATCH] If state is malformed, quit and restart app --- lib/intval/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/intval/index.js b/lib/intval/index.js index 04b3831..df40ad7 100644 --- a/lib/intval/index.js +++ b/lib/intval/index.js @@ -59,6 +59,9 @@ intval.init = function () { }) }).catch((err) => { log.error('init', err) + fs.rmdirSync('./state') + log.warn('Restarting') + process.exit() }) intval._frame = {