From 65844843ebcf66935fb19b433883b35186c125be Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 17 Jan 2024 16:05:50 -0400 Subject: test, yaml: rework linkAndBindWikiData --- src/data/yaml.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/data/yaml.js') diff --git a/src/data/yaml.js b/src/data/yaml.js index 819c639f..9f2bd7a4 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -1514,18 +1514,7 @@ export async function loadAndProcessDataDocuments({dataPath}) { // Data linking! Basically, provide (portions of) wikiData to the Things which // require it - they'll expose dynamically computed properties as a result (many // of which are required for page HTML generation and other expected behavior). -// -// The XXX_decacheWikiData option should be used specifically to mark -// points where you *aren't* replacing any of the arrays under wikiData with -// new values, and are using linkWikiDataArrays to instead "decache" data -// properties which depend on any of them. It's currently not possible for -// a CacheableObject to depend directly on the value of a property exposed -// on some other CacheableObject, so when those values change, you have to -// manually decache before the object will realize its cache isn't valid -// anymore. -export function linkWikiDataArrays(wikiData, { - XXX_decacheWikiData = false, -} = {}) { +export function linkWikiDataArrays(wikiData) { const linkWikiDataSpec = new Map([ [wikiData.albumData, [ 'artTagData', @@ -1588,7 +1577,6 @@ export function linkWikiDataArrays(wikiData, { if (thing === undefined) continue; for (const key of keys) { if (!(key in wikiData)) continue; - if (XXX_decacheWikiData) thing[key] = []; thing[key] = wikiData[key]; } } -- cgit 1.3.0-6-gf8a5