Skip to content

Commit

Permalink
Better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom committed Jan 21, 2021
1 parent 14934a0 commit a78a14b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stormdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class StormDB {
let data = this.state;
for (let i = 0; i < this.pointers.length; i++) {
if (i < this.pointers.length - 1 && !data[this.pointers[i]]) {
throw new Error("Can't run .value() on non-existant data.");
throw new Error("Can't run .value() on non-existant property of non-existant object.");
}
data = data[this.pointers[i]];
}
Expand Down

0 comments on commit a78a14b

Please sign in to comment.