From 00009cad8259b76d82de091712dbb95ec40faa1b Mon Sep 17 00:00:00 2001 From: clement chevalier Date: Thu, 3 Nov 2016 16:43:39 +0100 Subject: [PATCH 1/2] solve 0 key see as no key Actualy when a key is set to 0, the firebase-document think that there is no key, but firebase can self generate key at 0 from array, and the concerned item will be untouchable. --- firebase-document.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-document.html b/firebase-document.html index f498df6..823072a 100644 --- a/firebase-document.html +++ b/firebase-document.html @@ -86,7 +86,7 @@ reject(new Error('No app configured!')); } - if (key) { + if (key !== undefined) { path = parentPath + '/' + key; resolve(this._setFirebaseValue(path, this.data)); } else { From 6df1e8aaf86fc3e37610a3ab14d6b0d9d5ab573d Mon Sep 17 00:00:00 2001 From: clement chevalier Date: Thu, 3 Nov 2016 19:57:37 +0100 Subject: [PATCH 2/2] better test for undefined key --- firebase-document.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-document.html b/firebase-document.html index 823072a..2596c68 100644 --- a/firebase-document.html +++ b/firebase-document.html @@ -86,7 +86,7 @@ reject(new Error('No app configured!')); } - if (key !== undefined) { + if (typeof key !== 'undefined') { path = parentPath + '/' + key; resolve(this._setFirebaseValue(path, this.data)); } else {