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

this class reference out of scope #146

Open
pressoholics opened this issue Jan 27, 2021 · 0 comments
Open

this class reference out of scope #146

pressoholics opened this issue Jan 27, 2021 · 0 comments

Comments

@pressoholics
Copy link

Thanks for the great plugin btw.

I was getting an error resulting from "this" being undefined inside the storage.put call within handleFileUpload method.

if (!this.uppy.getFile(file.id)) {

I thought that maybe the reference to the parent class 'this' was out of scope hence undefined. As a test I stored a reference to the parent class in var parentClass = this; index the handleFileUpload method. The used that in place of this to reference the parent class. It appears to remove the error.

Not sure if this is helpful, just wanted to share it

Cheers!

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

1 participant