From a78a14b0bec8bd4a7da64f15bab69434f71dc7f6 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 21 Jan 2021 17:32:10 +0000 Subject: [PATCH] Better error message --- src/stormdb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stormdb.js b/src/stormdb.js index f093a7f..a3bc4f8 100644 --- a/src/stormdb.js +++ b/src/stormdb.js @@ -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]]; }