From edad98e0408571e4c6cabceaa5234510cefaaea5 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 11 Jan 2025 17:33:58 -0400 Subject: reverse: bindTo 'wikiData' --- src/reverse.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/reverse.js') diff --git a/src/reverse.js b/src/reverse.js index 9cab5ef8..59790219 100644 --- a/src/reverse.js +++ b/src/reverse.js @@ -22,7 +22,9 @@ function reverseHelper(spec) { // one reverse spec is different from another. const referencingThings = - data.flatMap(thing => spec.referencing(thing)); + (spec.bindTo === 'wikiData' + ? spec.referencing(data) + : data.flatMap(thing => spec.referencing(thing))); const referencedThings = referencingThings.map(thing => spec.referenced(thing)); -- cgit 1.3.0-6-gf8a5