Skip to content

Commit 5eac8ed

Browse files
committed
Only treat "$ref" as reference if value is string
1 parent 80d9306 commit 5eac8ed

File tree

1 file changed

+2
-2
lines changed
  • packages/libs/deduplication/src

1 file changed

+2
-2
lines changed

packages/libs/deduplication/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,11 @@ export class Deduplicator {
400400
continue;
401401
}
402402

403-
if (key === "$ref") {
403+
if (key === "$ref" && typeof value === "string") {
404404
const refParts = value.split("/");
405405
const componentUid = refParts.pop();
406406
const type = refParts.pop();
407-
await this.deduplicateComponent(componentUid, type);
407+
await this.deduplicateComponent(componentUid!, type!);
408408
} else if (value && typeof value === "object") {
409409
await this.crawlObject(value);
410410
}

0 commit comments

Comments
 (0)