FIX: iconList is an array in production (#11308)

This should be investigated further, but hopefully the comment will prevent anyone else to fall in this trap.
This commit is contained in:
Joffrey JAFFEUX 2020-11-20 20:00:51 +01:00 committed by GitHub
parent 0ec62358d9
commit 8aa912c885
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -115,8 +115,9 @@ export function setIconList(iconList) {
} }
export function isExistingIconId(id) { export function isExistingIconId(id) {
// _iconList is actually an array as a string: '["foo", "bar"]' // TODO: investigate why _iconList is actually an array as a string: '["foo", "bar"]'
return _iconList && _iconList.indexOf(`"${id}"`) >= 0; // in local and a real array in production
return _iconList && _iconList.indexOf(id) >= 0;
} }
function warnIfMissing(id) { function warnIfMissing(id) {