Skip to content

Commit

Permalink
fix typo: proxy instead of handler
Browse files Browse the repository at this point in the history
when handler is empty, proxy (instead of handler) should be equal to target
  • Loading branch information
wudragonfly authored Mar 14, 2017
1 parent 9ecf067 commit d56b6ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ proxy.a = 'b';
target.a // "b"
```

上面代码中,`handler`是一个空对象,没有任何拦截效果,访问`handler`就等同于访问`target`
上面代码中,`handler`是一个空对象,没有任何拦截效果,访问`proxy`就等同于访问`target`

一个技巧是将 Proxy 对象,设置到`object.proxy`属性,从而可以在`object`对象上调用。

Expand Down

0 comments on commit d56b6ea

Please sign in to comment.