Skip to content

add typescript definition and fix this is undefined #10

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wanglam
Copy link

@wanglam wanglam commented Apr 7, 2022

Thanks for this package.
I found issues when I using this package. So I want to fix them.
In the first commit, I add a typescript definition for this package, then we don't need to write a extra definition file for this package.
In the second commit, I fix a bug in the error callback. When Image onerror method call, "this.options" in error method will be undefined (Because we call it in onerror callback). So I add a .bind(_this) to fix this bug.

@wanglam wanglam changed the title Feature/add typescript definition add typescript definition and fix this is undefined Apr 7, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant