Skip to content

Commit 742065c

Browse files
committed
fix keys
1 parent c46c634 commit 742065c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/store/src/-private/caches/identifier-cache.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -676,15 +676,21 @@ function makeStableRecordIdentifier(
676676
get [DEBUG_IDENTIFIER_BUCKET]() {
677677
return bucket;
678678
},
679-
toString() {
679+
};
680+
Object.defineProperty(proto, 'toString', {
681+
enumerable: false,
682+
value: () => {
680683
const { type, id, lid } = recordIdentifier;
681684
return `${clientOriginated ? '[CLIENT_ORIGINATED] ' : ''}${String(type)}:${String(id)} (${lid})`;
682685
},
683-
toJSON() {
686+
});
687+
Object.defineProperty(proto, 'toJSON', {
688+
enumerable: false,
689+
value: () => {
684690
const { type, id, lid } = recordIdentifier;
685691
return { type, id, lid };
686692
},
687-
};
693+
});
688694
Object.setPrototypeOf(wrapper, proto);
689695
DEBUG_MAP.set(wrapper, recordIdentifier);
690696
wrapper = freeze(wrapper);

0 commit comments

Comments
 (0)