@fonixtree/magic-design 2.0.18 → 2.0.19

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.
@@ -106,6 +106,8 @@ function History(_a) {
106
106
  })), /*#__PURE__*/_react["default"].createElement("div", {
107
107
  className: "history_list"
108
108
  }, source.length > 0 && source.map(function (his, index) {
109
+ var _a;
110
+
109
111
  return /*#__PURE__*/_react["default"].createElement("div", {
110
112
  className: (0, _classnames["default"])('historyNode', {
111
113
  active: selectKey === his.key
@@ -124,7 +126,7 @@ function History(_a) {
124
126
  type: selected.includes(index) ? 'icon-select1' : 'icon-uncheck'
125
127
  })), /*#__PURE__*/_react["default"].createElement("img", {
126
128
  alt: "",
127
- src: his.images[0]
129
+ src: ((_a = his === null || his === void 0 ? void 0 : his.images) === null || _a === void 0 ? void 0 : _a.length) ? his.images[0] : ''
128
130
  }), his.images.length > 1 && /*#__PURE__*/_react["default"].createElement("span", {
129
131
  className: "hisImgNum"
130
132
  }, his.images.length));
@@ -349,6 +349,16 @@ function (_super) {
349
349
 
350
350
  case 2:
351
351
  result = _a.sent();
352
+
353
+ if (!result || !result.imageList) {
354
+ this.setState({
355
+ loading: false
356
+ });
357
+ return [2
358
+ /*return*/
359
+ ];
360
+ }
361
+
352
362
  history.push({
353
363
  key: (0, _uuid.v4)(),
354
364
  images: result.imageList,
@@ -404,6 +414,16 @@ function (_super) {
404
414
 
405
415
  case 2:
406
416
  result = _c.sent();
417
+
418
+ if (!result || !result.imageList) {
419
+ this.setState({
420
+ loading: false
421
+ });
422
+ return [2
423
+ /*return*/
424
+ ];
425
+ }
426
+
407
427
  history[hisCursor] = {
408
428
  key: key,
409
429
  images: result.imageList,
@@ -504,6 +524,16 @@ function (_super) {
504
524
 
505
525
  case 2:
506
526
  result = _c.sent();
527
+
528
+ if (!result || !result.imageList) {
529
+ this.setState({
530
+ loading: false
531
+ });
532
+ return [2
533
+ /*return*/
534
+ ];
535
+ }
536
+
507
537
  images[index] = result.imageList[0];
508
538
  this.historyChange(history);
509
539
  this.setState({
@@ -106,6 +106,8 @@ function History(_a) {
106
106
  })), /*#__PURE__*/_react["default"].createElement("div", {
107
107
  className: "history_list"
108
108
  }, source.length > 0 && source.map(function (his, index) {
109
+ var _a;
110
+
109
111
  return /*#__PURE__*/_react["default"].createElement("div", {
110
112
  className: (0, _classnames["default"])('historyNode', {
111
113
  active: selectKey === his.key
@@ -124,7 +126,7 @@ function History(_a) {
124
126
  type: selected.includes(index) ? 'icon-select1' : 'icon-uncheck'
125
127
  })), /*#__PURE__*/_react["default"].createElement("img", {
126
128
  alt: "",
127
- src: his.images[0]
129
+ src: ((_a = his === null || his === void 0 ? void 0 : his.images) === null || _a === void 0 ? void 0 : _a.length) ? his.images[0] : ''
128
130
  }), his.images.length > 1 && /*#__PURE__*/_react["default"].createElement("span", {
129
131
  className: "hisImgNum"
130
132
  }, his.images.length));
@@ -349,6 +349,16 @@ function (_super) {
349
349
 
350
350
  case 2:
351
351
  result = _a.sent();
352
+
353
+ if (!result || !result.imageList) {
354
+ this.setState({
355
+ loading: false
356
+ });
357
+ return [2
358
+ /*return*/
359
+ ];
360
+ }
361
+
352
362
  history.push({
353
363
  key: (0, _uuid.v4)(),
354
364
  images: result.imageList,
@@ -404,6 +414,16 @@ function (_super) {
404
414
 
405
415
  case 2:
406
416
  result = _c.sent();
417
+
418
+ if (!result || !result.imageList) {
419
+ this.setState({
420
+ loading: false
421
+ });
422
+ return [2
423
+ /*return*/
424
+ ];
425
+ }
426
+
407
427
  history[hisCursor] = {
408
428
  key: key,
409
429
  images: result.imageList,
@@ -504,6 +524,16 @@ function (_super) {
504
524
 
505
525
  case 2:
506
526
  result = _c.sent();
527
+
528
+ if (!result || !result.imageList) {
529
+ this.setState({
530
+ loading: false
531
+ });
532
+ return [2
533
+ /*return*/
534
+ ];
535
+ }
536
+
507
537
  images[index] = result.imageList[0];
508
538
  this.historyChange(history);
509
539
  this.setState({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.18",
4
+ "version": "2.0.19",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
Binary file
Binary file