Skip to content

Commit

Permalink
sched: Fix readStorage when files do not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
nxdefiant committed Sep 5, 2023
1 parent e9e2d2e commit f30c439
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/sched/interface.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@

function readStorageIfExists(filename, cb) {
Puck.write(`\x10(function() {
Bluetooth.print(JSON.stringify(require("Storage").list("${filename}").sort()));
Bluetooth.print(JSON.stringify(require("Storage").list("${filename}")));
})()\n`, contents => {
const fileNames = JSON.parse(contents);
if (fileNames.length > 0) {
if (fileNames.length > 0 && fileNames.includes(filename)) {
Util.readStorage(filename,cb);
} else {
cb();
Expand Down

0 comments on commit f30c439

Please sign in to comment.