diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-07 17:23:54 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-07 17:23:54 -0300 |
commit | a24a72339f6e6e416a797d869fe9c4d9057fcac0 (patch) | |
tree | 5fca08fd511a2842c7f8d49288cc83515e931e85 /src | |
parent | 9db4b91c66f8b9b98d098bfe446e29f5b3caee53 (diff) |
data: custom _homepageSourceGroup reference validation function
Diffstat (limited to 'src')
-rw-r--r-- | src/data/yaml.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js index c0aad943..8aca3299 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -1490,7 +1490,7 @@ export function filterReferenceErrors(wikiData) { }], ['homepageLayout.rows', undefined, { - sourceGroupByRef: 'group', + sourceGroupByRef: '_homepageSourceGroup', sourceAlbumsByRef: 'album', }], @@ -1560,6 +1560,16 @@ export function filterReferenceErrors(wikiData) { }; break; + case '_homepageSourceGroup': + findFn = groupRef => { + if (groupRef === 'new-additions' || groupRef === 'new-releases') { + return true; + } + + return boundFind.group(groupRef); + }; + break; + case '_trackNotRerelease': findFn = trackRef => { const track = find.track(trackRef, wikiData.trackData, {mode: 'error'}); |