diff --git a/lib/modules/firestore/Path.js b/lib/modules/firestore/Path.js index 460c2763..c7fa414f 100644 --- a/lib/modules/firestore/Path.js +++ b/lib/modules/firestore/Path.js @@ -34,7 +34,7 @@ export default class Path { } parent(): Path | null { - return this._parts.length + return this._parts.length > 1 ? new Path(this._parts.slice(0, this._parts.length - 1)) : null; }