Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Fixes access on deeply nested, nonexistent property. (#1432)
- Add features to task queue functions. (#1423)
- Add traces to V2 Firestore trigger logs. (#1440)
1 change: 1 addition & 0 deletions spec/v1/providers/database.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ describe("DataSnapshot", () => {
populate(applyChange({ a: 23 }, { b: 33 }));
expect(subject.child("a/b").val()).to.be.null;
expect(subject.child("b/c").val()).to.be.null;
expect(subject.child("a/b/c").val()).to.be.null;
});

it("should return a leaf value", () => {
Expand Down
3 changes: 3 additions & 0 deletions src/common/providers/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ export class DataSnapshot implements database.DataSnapshot {
let source = this._data;
if (parts.length) {
for (const part of parts) {
if (source[part] === undefined) {
return null;
}
source = source[part];
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/v2/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export function getGlobalOptions(): GlobalOptions {
* Additional fields that can be set on any event-handling function.
*/
export interface EventHandlerOptions extends Omit<GlobalOptions, "enforceAppCheck"> {
/** Type of the event. Valid values are TODO */
/** Type of the event. Valid values are TODO */
eventType?: string;

/** TODO */
Expand Down