Skip to content

Commit 18b714b

Browse files
committed
Fixed issue calling DataSnapshot methods with null data (see firebase/firebase-functions-test#254)
1 parent bcac255 commit 18b714b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/providers/database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export class DataSnapshot implements database.DataSnapshot {
128128
let source = this._data;
129129
if (parts.length) {
130130
for (const part of parts) {
131-
if (source[part] === undefined) {
131+
if (source[part] === undefined || source[part] === null) {
132132
return null;
133133
}
134134
source = source[part];

0 commit comments

Comments
 (0)