@iobroker/adapter-react-v5 7.4.14 → 7.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1246,7 +1246,12 @@ function buildTree(objects, options) {
1246
1246
  const common = obj.common;
1247
1247
  const role = common?.role;
1248
1248
  if (role && !info.roles.find(it => it.role === role)) {
1249
- info.roles.push({ role, type: common.type });
1249
+ if (typeof role !== 'string') {
1250
+ console.warn(`Invalid role type "${typeof role}" in "${obj._id}"`);
1251
+ }
1252
+ else {
1253
+ info.roles.push({ role, type: common.type });
1254
+ }
1250
1255
  }
1251
1256
  else if (id.startsWith('enum.rooms.')) {
1252
1257
  info.roomEnums.push(id);