Skip to content

Commit 48da231

Browse files
committed
[hash] Undo breaking change on undefined for now
1 parent c43aae3 commit 48da231

File tree

2 files changed

+111
-110
lines changed

2 files changed

+111
-110
lines changed

src/common/hash.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ import type {
1414
} from '../@types/common/index.d.ts';
1515
import type {Hash, Hlc, Id, ValueOrUndefined} from '../@types/index.d.ts';
1616
import {arrayForEach, arrayReduce} from './array.ts';
17-
import {jsonStringWithUndefined} from './json.ts';
17+
import {jsonStringWithMap} from './json.ts';
1818
import {objEntries} from './obj.ts';
1919
import {GLOBAL} from './other.ts';
20+
import {EMPTY_STRING} from './strings.ts';
2021

2122
const textEncoder = /* @__PURE__ */ new GLOBAL.TextEncoder();
2223

@@ -55,7 +56,7 @@ export const getValueInValuesHash: typeof getValueHashInValuesDecl = (
5556
export const getValueHash: typeof getValueHashDecl = (
5657
value: ValueOrUndefined,
5758
valueHlc: Hlc,
58-
): Hash => getHash(jsonStringWithUndefined(value) + ':' + valueHlc);
59+
): Hash => getHash(jsonStringWithMap(value ?? null) + ':' + valueHlc);
5960

6061
export const getCellHash: typeof getCellHashDecl = getValueHash;
6162

0 commit comments

Comments
 (0)