@tarojs/extend 4.0.0-canary.1 → 4.0.0-canary.11

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.
package/LICENSE CHANGED
@@ -158,3 +158,17 @@ MIT (stencil-vue2-output-target):
158
158
  The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
159
159
  `/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
160
160
  See `/LICENSE` for details of the license.
161
+
162
+ ==================
163
+
164
+ MIT (weui):
165
+ The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
166
+ `/packages/taro-components/src/components/*.scss`
167
+ See `/LICENSE.txt` for details of the license.
168
+
169
+ ==================
170
+
171
+ Apache-2.0 (intersection-observer):
172
+ The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
173
+ `/packages/taro-api/src/polyfill/intersection-observer.ts`
174
+ See `/LICENSE.txt` for details of the license.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/extend",
3
- "version": "4.0.0-canary.1",
3
+ "version": "4.0.0-canary.11",
4
4
  "description": "Taro extend functionality",
5
5
  "author": "yuche <i@yuche.me>",
6
6
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro-extend#readme",
@@ -815,9 +815,13 @@ export const Zepto = (function () {
815
815
  if (isBrowser) {
816
816
  return Promise.resolve(hasScrollTop ? this[0].scrollTop : this[0].pageYOffset)
817
817
  }
818
- return hasScrollTop ? Promise.resolve(this[0].scrollTop) : new Promise((resolve) => {
818
+ return hasScrollTop ? Promise.resolve(this[0].scrollTop) : new Promise((resolve, reject) => {
819
819
  Taro.createSelectorQuery().select('#' + this[0].uid).scrollOffset(function (res) {
820
- resolve(res.scrollTop)
820
+ if (res) {
821
+ resolve(res.scrollTop)
822
+ } else {
823
+ reject(new Error(`get scrollTop error: #${this[0].uid} query fail`))
824
+ }
821
825
  }).exec()
822
826
  })
823
827
  }