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

Uncaught TypeError: Cannot read property '_android' of undefined #113

Open
flyandflying opened this issue Mar 20, 2017 · 3 comments
Open

Comments

@flyandflying
Copy link

在严格模式下("use strict";)会报错,因为此时this为undefined,而不是window。
解决:把 if (this._android && this._android <= 2.1) 改为 if (this && this._android <= 2.1)

@HotEvent
Copy link

出个webpack版的包好不

@CompileYouth
Copy link

image 1

错误原因上面讲了是 this 的问题,所以将 window 绑进去就行了。这里只 bind 了一个,代码应该可以正常运行了,但如果想要使得所有代码正常运行,那可能需要在多处 bind。

@qxdmmc
Copy link

qxdmmc commented Jan 25, 2021

https://www.npmjs.com/package/qrcodejs2-fix

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

4 participants