Skip to content

Comments

Fix:‘TypeError: responseCookies.replace is not a function’#68

Open
Limonica27 wants to merge 1 commit intocharleslo1:masterfrom
Limonica27:bug/responseCookies
Open

Fix:‘TypeError: responseCookies.replace is not a function’#68
Limonica27 wants to merge 1 commit intocharleslo1:masterfrom
Limonica27:bug/responseCookies

Conversation

@Limonica27
Copy link

作者你好:
在使用weapp-cookie库中遇到一个问题,已经查询到问题原因并进行兼容处理
是在uniapp项目中使用编译到微信小程序,调用uploadFile在ios真机下取到的 responseCookies是一个数组,在调用replace出错了
image
经过正常调试发现,接口的response确实返回了三个Set-Cookie,但是在大部分情机型况下responseCookies都是‘字符串+,’拼接好,但在在ios真机下没有进行字符串处理所以我们这里手动调用一下toString()就可以了
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant