@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.
@@ -2873,13 +2873,16 @@ function importPixiVNJson(data) {
2873
2873
  console.error("[Pixi'VN] Error parsing imported Pixi'VN JSON: data is not an object");
2874
2874
  return;
2875
2875
  }
2876
- for (const labelId in data.labels) {
2877
- try {
2878
- const steps = data[labelId];
2879
- let label = new LabelJson2(labelId, steps);
2880
- saveLabel(label);
2881
- } catch (e) {
2882
- console.error(`[Pixi'VN] Error creating JSON label ${labelId}`, e);
2876
+ if (data.labels) {
2877
+ let labels = data.labels;
2878
+ for (const labelId in labels) {
2879
+ try {
2880
+ const steps = labels[labelId];
2881
+ let label = new LabelJson2(labelId, steps);
2882
+ saveLabel(label);
2883
+ } catch (e) {
2884
+ console.error(`[Pixi'VN] Error creating JSON label ${labelId}`, e);
2885
+ }
2883
2886
  }
2884
2887
  }
2885
2888
  }