Skip to content

Commit

Permalink
fix(plugin-network): fixed create proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
dlhandsome committed May 12, 2020
1 parent df12152 commit 26381a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/plugin-network/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ class NetworkPlugin {
*/
createProxy() {
this.networkCallee.forEach(method => {
Object.defineProperty(wx, method, {
get: () => (opt = {}) => this.proxyHandler(method, opt)
setTimeout(() => {
Object.defineProperty(wx, method, {
get: () => (opt = {}) => this.proxyHandler(method, opt)
});
});
});
}
Expand Down

0 comments on commit 26381a1

Please sign in to comment.