Skip to content

Commit

Permalink
Update storage-helper.js
Browse files Browse the repository at this point in the history
  • Loading branch information
pklaschka authored Oct 28, 2018
1 parent 25ec995 commit 70ed8d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions storage-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ class storageHelper {
return file;
}
else {
throw new Error(Storage file storage.json was not a file.');
throw new Error('Storage file storage.json was not a file.');
}

} catch {
const file = await dataFolder.createEntry('data.json', {type: storage.types.file, overwrite: true});
if (file.isFile) {
await file.write('{}', {append: false});
// noinspection JSValidateTypes
return file;
} else {
throw new Error('Storage file storage.json was not a file.');
Expand Down

0 comments on commit 70ed8d6

Please sign in to comment.