Skip to content

Commit fa131f8

Browse files
committed
fix: #87
1 parent 131a177 commit fa131f8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42317,7 +42317,7 @@ module.exports = function() {
4231742317
})
4231842318

4231942319
// 注入 api
42320-
if (typeof global.wx === 'function') global.wx = Object.assign(api, global.wx)
42320+
if (typeof global.wx === 'object') global.wx = Object.assign(api, global.wx)
4232142321
else global.wx = api
4232242322
}
4232342323

docs/update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 更新日志
22

3-
## 1.5.4
3+
## 1.5.5
44

55
* 修复 global.wx 赋值会覆盖用户模拟的 wx 对象问题
66

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "miniprogram-simulate",
3-
"version": "1.5.4",
3+
"version": "1.5.5",
44
"description": "tools for miniprogram custom component unit test",
55
"main": "index.js",
66
"types": "index.d.ts",

src/definition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ module.exports = function() {
2424
})
2525

2626
// 注入 api
27-
if (typeof global.wx === 'function') global.wx = Object.assign(api, global.wx)
27+
if (typeof global.wx === 'object') global.wx = Object.assign(api, global.wx)
2828
else global.wx = api
2929
}

0 commit comments

Comments
 (0)