-
Notifications
You must be signed in to change notification settings - Fork 71
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
fallback to initials if the image is not loaded (#40) #64
Conversation
Hi, interesting solution, did you take this pattern from somewhere? |
Yes, the technique is based on information I found here: https://stackoverflow.com/questions/5057990/how-can-i-check-if-a-background-image-is-loaded |
I think another possibility would be to use something like https://github.com/desandro/imagesloaded ; based on my very quick read of its code (and I am not an expert) it does something somewhat similar-- creating a |
@saintplay would you consider merging this? |
I didn't have time to try this. @andreasvirkus can you confirm if this works? |
(I'm still here and happy to adjust this PR if there is review feedback) |
@saintplay Checked it out and it seems to work great and not break any behaviour. You can see that the @danielbprice i've added a minor comment and a question to your PR, but otherwise really eager to see this merged 🎉 (also linking to #69) |
I've removed the extraneous edit to package.json (I don't know why, but I can no longer reproduce the problem with vue-test that led me to do this; perhaps I hit a window where something was broken upstream which is now fixed) and fixed the issue with the documentation noted by @andreasvirkus Wasn't really sure if I was supposed to update the bundle, so let me know and I can strip out that change if not. |
LGTM @saintplay |
@danielbprice it seems like you need to remove vue-avatar.min.js file or update your branch with |
Sorry I'm late, I didn't get a notification. Released in v2.3.0 |
(Belatedly) Thank you! I appreciate it. |
Also, fix the version of vue-test-utils to 1.0.0-beta.20 to protect from breaking changes