From 859cb40e0f745801df0028909f8ffba32fd43c08 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Thu, 1 Dec 2022 14:29:15 +0100 Subject: [PATCH] Unify Derivation and Prism 6/n --- packages/dataverse/src/Atom.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/dataverse/src/Atom.ts b/packages/dataverse/src/Atom.ts index 09732a5..ade5787 100644 --- a/packages/dataverse/src/Atom.ts +++ b/packages/dataverse/src/Atom.ts @@ -256,7 +256,7 @@ export default class Atom implements IdentityPrismProvider { } } -const identityDerivationWeakMap = new WeakMap<{}, Prism>() +const identifyPrismWeakMap = new WeakMap<{}, Prism>() /** * Returns a derivation of the value at the provided pointer. Derivations are @@ -269,7 +269,7 @@ export const pointerToPrism =

>( ): Prism

? T : void> => { const meta = getPointerMeta(pointer) - let derivation = identityDerivationWeakMap.get(meta) + let derivation = identifyPrismWeakMap.get(meta) if (!derivation) { const root = meta.root if (!isIdentityPrismProvider(root)) { @@ -279,7 +279,7 @@ export const pointerToPrism =

>( } const {path} = meta derivation = root.getIdentityPrism(path) - identityDerivationWeakMap.set(meta, derivation) + identifyPrismWeakMap.set(meta, derivation) } return derivation as $IntentionalAny }