don't fallback to first style if none specified
This commit is contained in:
parent
89b916da28
commit
406b973654
|
@ -339,6 +339,9 @@ const interfaceMod = {
|
||||||
let fetchFunc = index[result.nameUsed]
|
let fetchFunc = index[result.nameUsed]
|
||||||
// Fallbacks
|
// Fallbacks
|
||||||
if (!fetchFunc) {
|
if (!fetchFunc) {
|
||||||
|
if (resource === 'style' || resource === 'palette') {
|
||||||
|
return result
|
||||||
|
}
|
||||||
const newName = Object.keys(index)[0]
|
const newName = Object.keys(index)[0]
|
||||||
fetchFunc = index[newName]
|
fetchFunc = index[newName]
|
||||||
console.warn(`${capitalizedResource} with id '${state.styleNameUsed}' not found, trying back to '${newName}'`)
|
console.warn(`${capitalizedResource} with id '${state.styleNameUsed}' not found, trying back to '${newName}'`)
|
||||||
|
|
Loading…
Reference in a new issue