diff --git a/packages/realm/src/Results.ts b/packages/realm/src/Results.ts index 10cd921d9d..4ed2aea787 100644 --- a/packages/realm/src/Results.ts +++ b/packages/realm/src/Results.ts @@ -92,8 +92,8 @@ export class Results extends OrderedCollection< throw new Error("Modifying a Results collection is not supported."); } - get length(): number { - return this.internal.size(); + get length() { + return this.internal?.size() ?? 0; } set length(value: number) {