Fix: small fixes and crashes

This commit is contained in:
Pieter Vander Vennet 2025-02-16 01:34:54 +01:00
parent 33ec30339b
commit d17d07ec52
4 changed files with 8 additions and 6 deletions

View file

@ -29,7 +29,7 @@ class QuestionViz implements SpecialVisualizationSvelte {
},
{
name: "blacklisted-labels",
doc: "One or more ';'-separated labels of questions which should _not_ be included",
doc: "One or more ';'-separated labels of questions which should _not_ be included. Default: 'hidden'"
},
]
svelteBased = true
@ -46,10 +46,13 @@ class QuestionViz implements SpecialVisualizationSvelte {
?.split(";")
?.map((s) => s.trim())
?.filter((s) => s !== "")
const blacklist = args[1]
const blacklist = (args[1])
?.split(";")
?.map((s) => s.trim())
?.filter((s) => s !== "")
if (blacklist.length === 0) {
blacklist.push("hidden")
}
return new SvelteUIElement(Questionbox, {
layer,
tags,