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