From 865e68051e46a54abc1ae8a6cf82f86176417bf8 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 26 Jan 2021 13:59:28 +0000 Subject: [PATCH] include fallback for missing state file --- services/clsi/app/js/ResourceStateManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/clsi/app/js/ResourceStateManager.js b/services/clsi/app/js/ResourceStateManager.js index c77c254b05..e36f19ed67 100644 --- a/services/clsi/app/js/ResourceStateManager.js +++ b/services/clsi/app/js/ResourceStateManager.js @@ -62,7 +62,7 @@ module.exports = { 'project state file truncated' ) } - const array = result.toString().split('\n') + const array = result ? result.toString().split('\n') : [] const adjustedLength = Math.max(array.length, 1) const resourceList = array.slice(0, adjustedLength - 1) const oldState = array[adjustedLength - 1]