mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 04:18:01 +00:00
refactor(studio): read animation cache keys through their owner
The timeline-element animation lookup rebuilt the three cache-key variants by hand. elementCacheKeys already owns that list for the writers, so this reader takes it from there instead of drifting from it.
This commit is contained in:
@@ -113,7 +113,8 @@ export function clearKeyframeCacheForFile(sourceFile: string): void {
|
||||
}
|
||||
}
|
||||
|
||||
function elementCacheKeys(sourceFile: string, elementId: string): string[] {
|
||||
/** Every cache key a write for this element sets, in read-preference order. */
|
||||
export function elementCacheKeys(sourceFile: string, elementId: string): string[] {
|
||||
return sourceFile === "index.html"
|
||||
? [`index.html#${elementId}`, elementId]
|
||||
: [`${sourceFile}#${elementId}`, `index.html#${elementId}`, elementId];
|
||||
|
||||
Reference in New Issue
Block a user