@tuya-miniapp/smart-ui 2.1.2 → 2.1.3-beta-1

Sign up to get free protection for your applications and to get access to all the features.
@@ -190,8 +190,8 @@ SmartComponent({
190
190
  getAllRect(this, '.smart-tab'),
191
191
  type === 'line' ? getRect(this, '.smart-tabs__line') : Promise.resolve({ width: 0 }),
192
192
  ]).then(([rects = [], lineRect]) => {
193
- const rect = rects[currentIndex];
194
- if (rect == null) {
193
+ const rect = rects === null || rects === void 0 ? void 0 : rects[currentIndex];
194
+ if (rect == null || rect === undefined) {
195
195
  return;
196
196
  }
197
197
  const { width: cardWidth, height: cardHeight } = rects[currentIndex];
package/lib/tabs/index.js CHANGED
@@ -211,8 +211,8 @@ var relation_1 = require("../common/relation");
211
211
  type === 'line' ? (0, utils_1.getRect)(this, '.smart-tabs__line') : Promise.resolve({ width: 0 }),
212
212
  ]).then(function (_a) {
213
213
  var _b = _a[0], rects = _b === void 0 ? [] : _b, lineRect = _a[1];
214
- var rect = rects[currentIndex];
215
- if (rect == null) {
214
+ var rect = rects === null || rects === void 0 ? void 0 : rects[currentIndex];
215
+ if (rect == null || rect === undefined) {
216
216
  return;
217
217
  }
218
218
  var _c = rects[currentIndex], cardWidth = _c.width, cardHeight = _c.height;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.1.2",
3
+ "version": "2.1.3-beta-1",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",