Skip to content

Commit c66549d

Browse files
authored
- Fixed Obsidian FieldFilterFunctionBuilder type check to correctly check for object instead of array.
1 parent b7d463e commit c66549d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Rock.JavaScript.Obsidian/Framework/Core/Reporting/fieldFilter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export class FieldFilterFunctionBuilder<T = unknown> {
273273

274274
// Look for the standard "attributes" property for entities.
275275
const attributes = instance["attributes"] as Record<string, PublicAttributeBag> | null | undefined;
276-
if (!attributes || !Array.isArray(attributes)) {
276+
if (!attributes || typeof attributes !== "object") {
277277
return undefined;
278278
}
279279

@@ -302,7 +302,7 @@ export class FieldFilterFunctionBuilder<T = unknown> {
302302

303303
// Look for the standard "attributes" property for entities.
304304
const attributes = instance["attributes"] as Record<string, PublicAttributeBag> | null | undefined;
305-
if (!attributes || !Array.isArray(attributes)) {
305+
if (!attributes || typeof attributes !== "object") {
306306
return undefined;
307307
}
308308

0 commit comments

Comments
 (0)