@drincs/pixi-vn 0.6.12 → 0.6.13

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/dist/index.js CHANGED
@@ -1649,13 +1649,16 @@ function importPixiVNJson(data) {
1649
1649
  console.error("[Pixi'VN] Error parsing imported Pixi'VN JSON: data is not an object");
1650
1650
  return;
1651
1651
  }
1652
- for (const labelId in data.labels) {
1653
- try {
1654
- const steps = data[labelId];
1655
- let label = new LabelJson2(labelId, steps);
1656
- saveLabel(label);
1657
- } catch (e) {
1658
- console.error(`[Pixi'VN] Error creating JSON label ${labelId}`, e);
1652
+ if (data.labels) {
1653
+ let labels = data.labels;
1654
+ for (const labelId in labels) {
1655
+ try {
1656
+ const steps = labels[labelId];
1657
+ let label = new LabelJson2(labelId, steps);
1658
+ saveLabel(label);
1659
+ } catch (e) {
1660
+ console.error(`[Pixi'VN] Error creating JSON label ${labelId}`, e);
1661
+ }
1659
1662
  }
1660
1663
  }
1661
1664
  }