From 1f2cad1eee7166d1a0c4b3cb9ac13120a3b2131b Mon Sep 17 00:00:00 2001 From: James Addison Date: Thu, 8 Oct 2020 17:00:35 +0100 Subject: [PATCH] Add explanatory comment and remove TODO message --- addons/Dexie.Observable/src/Dexie.Observable.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/Dexie.Observable/src/Dexie.Observable.js b/addons/Dexie.Observable/src/Dexie.Observable.js index 37739f44c..6a3639578 100644 --- a/addons/Dexie.Observable/src/Dexie.Observable.js +++ b/addons/Dexie.Observable/src/Dexie.Observable.js @@ -256,9 +256,7 @@ function Observable(db) { } } - // TODO: Why is this safety check required? - // Without it, this test fails: https://github.com/dfahlander/Dexie.js/blob/77f0b08c58784bfaaf9e2f5e26dd4e1d7b7d3094/test/tests-exception-handling.js#L411-L494 - // ... due to an unhandled global TypeError: Cannot read property 'id' of null + // The local node reference may be unassigned at any point by a database close() operation if (!mySyncNode.node) return; // Assign the local node state