History

Use shared object helper in stable source hashing

Rhys Sullivan committed 9 months ago

Commit eade0141 parent a4730c91 file · +1 −1Browse files

Unified · Split

executor/packages/database/src/database/mappers.ts+1−1
@@ -7,7 +7,7 @@ function stableStringify(value: unknown): string { · 6 unmodified lines
77 return `[${value.map((entry) => stableStringify(entry)).join(",")}]`;
88 }
99 if (value && typeof value === "object") {
10− const record = value as Record<string, unknown>;
10+ const record = asRecord(value);
1111 const keys = Object.keys(record).sort();
1212 return `{${keys.map((key) => `${JSON.stringify(key)}:${stableStringify(record[key])}`).join(",")}}`;
1313 }