Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新数据时,如果不加setTimeout,update时报错 #32

Closed
hunshikan opened this issue Oct 20, 2018 · 10 comments
Closed

更新数据时,如果不加setTimeout,update时报错 #32

hunshikan opened this issue Oct 20, 2018 · 10 comments

Comments

@hunshikan
Copy link

//报错
that.store.data.themeColor = theme;
that.update();

//不报错
setTimeout(function () {
that.store.data.themeColor = theme;
that.update();
}, 10000)

@dntzhang
Copy link
Collaborator

报什么错?贴一下?

@dntzhang
Copy link
Collaborator

截个完整堆栈信息。

@hunshikan
Copy link
Author

TypeError: Cannot read property 'indexOf' of undefined
at matchGlobalData (create.js? [sm]:208)
at c.update (create.js? [sm]:189)
at changeTheme (theme.js? [sm]:91)
at Object.o.safeCallback (WAService.js:15)
at WAService.js:18
at p (WAService.js:18)
at WAService.js:18
at n (WAService.js:6)
at e (appservice?t=1540044769686:6216)
at r.registerCallback.t (

@hunshikan
Copy link
Author

上个版本没问题,今天升级了下,就有问题了。是不是和按需更新有关

@dntzhang
Copy link
Collaborator

提交了一版,试试~~

@hunshikan
Copy link
Author

完美解决!赞赞赞

@lentg
Copy link

lentg commented Oct 22, 2018

我昨天测试了一下,也是报这个错,在westore-cloud里

@dntzhang
Copy link
Collaborator

westore-cloud里的基础库没换

@lentg
Copy link

lentg commented Oct 23, 2018

westore-cloud里的基础库没换

赶紧更换一下啊,谢谢

@dntzhang
Copy link
Collaborator

已提交

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

No branches or pull requests

3 participants