kitchen-simulator 11.12.0 → 11.13.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.
@@ -818,6 +818,7 @@ export function render3DItem(element, layer, scene, sizeinfo, structure_json, is
818
818
  continue;
819
819
  }
820
820
  if (phs[k].indexOf('ph') == -1) {
821
+ var _url2;
821
822
  var _url = structure[temp[k - 1]];
822
823
  if (temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS()) in structure) {
823
824
  if (structure[temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS())] != null) {
@@ -825,17 +826,19 @@ export function render3DItem(element, layer, scene, sizeinfo, structure_json, is
825
826
  }
826
827
  }
827
828
  if (_typeof(_url) == Array) _url = _url[0];
828
- var uData = _url.split('/');
829
- uData = uData[uData.length - 1];
830
- uData = uData.slice(0, -5);
831
- var datas = uData.split('_');
832
- uData = datas[1];
833
- for (var _i = 2; _i < datas.length; _i++) {
834
- uData += '_';
835
- uData += datas[_i];
829
+ var uData = (_url2 = _url) === null || _url2 === void 0 ? void 0 : _url2.split('/');
830
+ if (uData) {
831
+ uData = uData[uData.length - 1];
832
+ uData = uData.slice(0, -5);
833
+ var datas = uData.split('_');
834
+ uData = datas[1];
835
+ for (var _i = 2; _i < datas.length; _i++) {
836
+ uData += '_';
837
+ uData += datas[_i];
838
+ }
839
+ uData = mainName.replace('main', uData);
840
+ phs[k] = 'ph_' + uData + '_' + phs[k];
836
841
  }
837
- uData = mainName.replace('main', uData);
838
- phs[k] = 'ph_' + uData + '_' + phs[k];
839
842
  }
840
843
  }
841
844
  phsArray.push(phs);
@@ -285,7 +285,7 @@ function _parseTempPlaceholdersFromCabinetPayload() {
285
285
  var newph = undefined;
286
286
  var blAdd = true;
287
287
  if (cabinetPayload.is_corner && cabinetPayload.is_corner !== -1) {
288
- if (tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
288
+ if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
289
289
  newph = tempPlaceholders.find(function (el) {
290
290
  return el.name.isLeftPlaceholder();
291
291
  });
@@ -293,12 +293,12 @@ function _parseTempPlaceholdersFromCabinetPayload() {
293
293
  blAdd = false;
294
294
  }
295
295
  } else {
296
- if (tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
296
+ if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
297
297
  newph = tempPlaceholders.find(function (el) {
298
298
  return el.name.isRightPlaceholder();
299
299
  });
300
300
  }
301
- if (tempData['base_door' + t.name.slice(-2)][0].isRightPlaceholder()) {
301
+ if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isRightPlaceholder()) {
302
302
  newph = tempPlaceholders.find(function (el) {
303
303
  return el.name.isLeftPlaceholder();
304
304
  });
@@ -832,6 +832,7 @@ function render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner
832
832
  continue;
833
833
  }
834
834
  if (phs[k].indexOf('ph') == -1) {
835
+ var _url2;
835
836
  var _url = structure[temp[k - 1]];
836
837
  if (temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS()) in structure) {
837
838
  if (structure[temp[k - 1] + '_doorStyle' + element.type + 'doorStyle' + JSON.stringify(doorStyles.toJS())] != null) {
@@ -839,17 +840,19 @@ function render3DItem(element, layer, scene, sizeinfo, structure_json, is_corner
839
840
  }
840
841
  }
841
842
  if ((0, _typeof2["default"])(_url) == Array) _url = _url[0];
842
- var uData = _url.split('/');
843
- uData = uData[uData.length - 1];
844
- uData = uData.slice(0, -5);
845
- var datas = uData.split('_');
846
- uData = datas[1];
847
- for (var _i = 2; _i < datas.length; _i++) {
848
- uData += '_';
849
- uData += datas[_i];
843
+ var uData = (_url2 = _url) === null || _url2 === void 0 ? void 0 : _url2.split('/');
844
+ if (uData) {
845
+ uData = uData[uData.length - 1];
846
+ uData = uData.slice(0, -5);
847
+ var datas = uData.split('_');
848
+ uData = datas[1];
849
+ for (var _i = 2; _i < datas.length; _i++) {
850
+ uData += '_';
851
+ uData += datas[_i];
852
+ }
853
+ uData = mainName.replace('main', uData);
854
+ phs[k] = 'ph_' + uData + '_' + phs[k];
850
855
  }
851
- uData = mainName.replace('main', uData);
852
- phs[k] = 'ph_' + uData + '_' + phs[k];
853
856
  }
854
857
  }
855
858
  phsArray.push(phs);
@@ -298,7 +298,7 @@ function _parseTempPlaceholdersFromCabinetPayload() {
298
298
  var newph = undefined;
299
299
  var blAdd = true;
300
300
  if (cabinetPayload.is_corner && cabinetPayload.is_corner !== -1) {
301
- if (tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
301
+ if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
302
302
  newph = tempPlaceholders.find(function (el) {
303
303
  return el.name.isLeftPlaceholder();
304
304
  });
@@ -306,12 +306,12 @@ function _parseTempPlaceholdersFromCabinetPayload() {
306
306
  blAdd = false;
307
307
  }
308
308
  } else {
309
- if (tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
309
+ if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isLeftPlaceholder()) {
310
310
  newph = tempPlaceholders.find(function (el) {
311
311
  return el.name.isRightPlaceholder();
312
312
  });
313
313
  }
314
- if (tempData['base_door' + t.name.slice(-2)][0].isRightPlaceholder()) {
314
+ if (tempData['base_door' + t.name.slice(-2)] && tempData['base_door' + t.name.slice(-2)][0].isRightPlaceholder()) {
315
315
  newph = tempPlaceholders.find(function (el) {
316
316
  return el.name.isLeftPlaceholder();
317
317
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "11.12.0",
3
+ "version": "11.13.0",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",