@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.
@@ -3180,13 +3180,16 @@ function importPixiVNJson(data) {
3180
3180
  console.error("[Pixi'VN] Error parsing imported Pixi'VN JSON: data is not an object");
3181
3181
  return;
3182
3182
  }
3183
- for (const labelId in data.labels) {
3184
- try {
3185
- const steps = data[labelId];
3186
- let label = new LabelJson2(labelId, steps);
3187
- saveLabel(label);
3188
- } catch (e) {
3189
- console.error(`[Pixi'VN] Error creating JSON label ${labelId}`, e);
3183
+ if (data.labels) {
3184
+ let labels = data.labels;
3185
+ for (const labelId in labels) {
3186
+ try {
3187
+ const steps = labels[labelId];
3188
+ let label = new LabelJson2(labelId, steps);
3189
+ saveLabel(label);
3190
+ } catch (e) {
3191
+ console.error(`[Pixi'VN] Error creating JSON label ${labelId}`, e);
3192
+ }
3190
3193
  }
3191
3194
  }
3192
3195
  }