关于代理:日常记录2

2次阅读

共计 169 个字符,预计需要花费 1 分钟才能阅读完成。

谬误记录

proxy 代理,在低版本 node 上报错问题

const a = obj => new Proxy({},{get(target, p){return obj;}
})

应用 proxy,代理一个空对象 {} 时,如果在 get 办法中,返回的属性是 {} 没有的,底层就会调用 getOwnPropertyDescriptor 属性,进而呈现问题,比方报如下问题

须要解决

正文完
 0