MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / resolveSnapshot

Function resolveSnapshot

packages/studio/src/utils/sdkResolverShadow.ts:93–99  ·  view source on GitHub ↗
(session: Composition, id: string)

Source from the content-addressed store, hash-verified

91}
92
93function resolveSnapshot(session: Composition, id: string): FlatEl | null {
94 const els = session.getElements();
95 const exact = els.find((el) => el.scopedId === id);
96 if (exact) return exact;
97 const matches = els.filter((el) => el.id === id);
98 return matches.find((el) => el.scopedId === el.id) ?? matches[0] ?? null;
99}
100
101function checkStyleOp(
102 op: PatchOperation,

Callers 2

sdkResolverShadowCheckFunction · 0.85
recordResolverParityFunction · 0.85

Calls 2

getElementsMethod · 0.65
findMethod · 0.65

Tested by

no test coverage detected