diff --git a/firebase-document.html b/firebase-document.html
index f498df6..2596c68 100644
--- a/firebase-document.html
+++ b/firebase-document.html
@@ -86,7 +86,7 @@
reject(new Error('No app configured!'));
}
- if (key) {
+ if (typeof key !== 'undefined') {
path = parentPath + '/' + key;
resolve(this._setFirebaseValue(path, this.data));
} else {