fix: upgrade script to handle strings as well

This commit is contained in:
Barış Soner Uşaklı
2021-12-20 15:43:44 -05:00
parent 32cbf760f6
commit e332acf3f7

View File

@@ -18,7 +18,7 @@ module.exports = {
}
delete navItem.properties;
}
if (navItem.hasOwnProperty('groups') && Array.isArray(navItem.groups)) {
if (navItem.hasOwnProperty('groups') && (Array.isArray(navItem.groups) || typeof navItem.groups === 'string')) {
navItem.groups = JSON.stringify(navItem.groups);
}
bulkSet.push([`navigation:enabled:${item.score}`, navItem]);