@playcanvas/inspector 0.3.0 → 0.4.0

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.
package/src/node-model.js CHANGED
@@ -157,9 +157,10 @@ function componentSection(name, component) {
157
157
 
158
158
  const handled = [...SKIP_COMPONENT, ...assetProperties];
159
159
 
160
- // layer ids, named from the composition they belong to
160
+ // layer ids, named from the composition they belong to. Other lists called layers, such as the
161
+ // animation layers of an anim component, are shown like any other property
161
162
  const layers = /** @type {any} */ (component).layers;
162
- if (Array.isArray(layers)) {
163
+ if (Array.isArray(layers) && layers.every(id => typeof id === 'number')) {
163
164
  const composition = /** @type {any} */ (component).system?.app?.scene?.layers ?? null;
164
165
  push(section, 'layers', layersValue(layers, composition));
165
166
  handled.push('layers');