Skip to content

Commit a6bd01c

Browse files
authored
Merge pull request #1472 from Duet3D/hotfix-filechecks
Updating Read File function
2 parents 58833ad + 5c42208 commit a6bd01c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nodescriptsTS/src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const readFile = {
141141
return new Promise((resolve, reject) => {
142142
fs.readFile(path, (err, data) => {
143143
if (err) reject(err);
144-
resolve(JSON.parse((data).toString()));
144+
resolve(JSON.parse((data||"").toString()));
145145
});
146146
});
147147
},

0 commit comments

Comments
 (0)