@tarojs/runtime 3.6.5 → 3.7.0-alpha.1
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/dist/runtime.esm.js +9 -1
- package/dist/runtime.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/runtime.esm.js
CHANGED
|
@@ -3692,7 +3692,15 @@ if (process.env.TARO_ENV && !isWebPlatform()) {
|
|
|
3692
3692
|
if (property === 'atob' || property === 'document')
|
|
3693
3693
|
return;
|
|
3694
3694
|
if (!Object.prototype.hasOwnProperty.call(this, property)) {
|
|
3695
|
-
|
|
3695
|
+
// 防止小程序环境下,window 上的某些 get 属性在赋值时报错
|
|
3696
|
+
try {
|
|
3697
|
+
this[property] = global[property];
|
|
3698
|
+
}
|
|
3699
|
+
catch (e) {
|
|
3700
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3701
|
+
console.warn(`[Taro warn] window.${String(property)} 在赋值到 window 时报错`);
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3696
3704
|
}
|
|
3697
3705
|
});
|
|
3698
3706
|
this.Date || (this.Date = Date);
|