mirror of
https://github.com/zhigang1992/react-native-wechat-1.git
synced 2026-04-30 13:21:42 +08:00
BUG FIX: 安卓 Object 没有 setPrototypeOf 方法
This commit is contained in:
@@ -315,6 +315,10 @@ export class WechatError extends Error {
|
|||||||
this.errCode = errCode
|
this.errCode = errCode
|
||||||
this.errMsg = errMsg
|
this.errMsg = errMsg
|
||||||
|
|
||||||
Object.setPrototypeOf(this, WechatError.prototype)
|
if (typeof Object.setPrototypeOf === 'function') {
|
||||||
|
Object.setPrototypeOf(this, WechatError.prototype)
|
||||||
|
} else {
|
||||||
|
this.__proto__ = WechatError.prototype
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user