Fixed so custom domains can be selected in levelup when multiclassing

This commit is contained in:
WBHarry 2025-08-10 18:21:54 +02:00
parent 6c258c6853
commit e64a6593dc
5 changed files with 19 additions and 20 deletions

View file

@ -85,13 +85,12 @@ export const chunkify = (array, chunkSize, mappingFunc) => {
export const tagifyElement = (element, baseOptions, onChange, tagifyOptions = {}) => {
const { maxTags } = tagifyOptions;
const options =
typeof baseOptions === 'object'
? Object.keys(baseOptions).map(optionKey => ({
...baseOptions[optionKey],
id: optionKey
}))
: baseOptions;
const options = Array.isArray(baseOptions)
? baseOptions
: Object.keys(baseOptions).map(optionKey => ({
...baseOptions[optionKey],
id: optionKey
}));
const tagifyElement = new Tagify(element, {
tagTextProp: 'name',