uni-helper / uni-network

为 uni-app 打造的基于 Promise 的 HTTP 客户端
https://uni-network.netlify.app
MIT License
76 stars 8 forks source link

TypeError: Cannot assign to read only property 'constructor' of function 'function () #50

Closed xiaohe0601 closed 4 months ago

xiaohe0601 commented 4 months ago

Describe the bug

TypeError: Cannot assign to read only property 'constructor' of function 'function () { [native code] }'
    at forEach.allOwnKeys.allOwnKeys (@uni-helper_uni-network.js:1900:1)
    at forEach (@uni-helper_uni-network.js:1892:1)
    at extend (@uni-helper_uni-network.js:1897:1)
    at createInstance (@uni-helper_uni-network.js:2698:1)
    at @uni-helper_uni-network.js:2703:1

Reproduction

dev:h5

https://github.com/uni-helper/uni-network/blob/c6e7a63088a38ae3ff8b131bc325e98a55f6b975/src/utils/extend.ts#L17

System Info

基础环境信息:

基础依赖信息:

uni-helper依赖信息:

Used Package Manager

pnpm

Validations

alva-lin commented 4 months ago

我也出现这个问题了,试了下 0.18.1 版本还是可用的。

ModyQyW commented 4 months ago

请尝试一下 0.19.2

xiaohe0601 commented 4 months ago

没问题了😀

ModyQyW commented 4 months ago

补充了 tests,见 https://github.com/uni-helper/uni-network/commit/6d4654131aec92788f874cd9bfe102b393d4b483 ,希望后续不会再出现这个问题。有问题欢迎反馈,今年年底预计发 v1 🙏