-
Notifications
You must be signed in to change notification settings - Fork 288
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
Placeholder functionality breaks during Cyrpess tests and after prod build #580
Comments
Hey Robert,
I echo those sentiments, very odd. Thank you for looking into it!
<https://www.rushmarket.com/>
*Drey Solano*
STAFF Software Engineer
technology
WWW.RUSHMARKET.COM <https://www.rushmarket.com/>
<https://www.facebook.com/therushmarketomaha>
<https://instagram.com/therushmarketomaha>
…On Tue, Aug 2, 2022 at 1:22 PM Robert ***@***.***> wrote:
Hi there! Thank you for your valuable feedback!
That is weird considering the ref should always be there as seen here:
<img :key="nSrc" v-bind="nAttrs" ref="img" :src="nSrc">
but I'll take a look!
—
Reply to this email directly, view it on GitHub
<#580 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUPH33BXNL5WBVVLWLLRC4TVXFRM3ANCNFSM55L3VGMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
HI,how to do this 【Add a check for existence of this.$refs.img in img.onload】? |
Would you be able to provide a reproduction? 🙏 More infoWhy do I need to provide a reproduction?Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. What will happen?If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect. If How can I create a reproduction?We have a template for starting with a minimal reproduction: 👉 https://stackblitz.com/github/nuxt/image/tree/main/example A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as minimal as possible. See more details in our guide. You might also find these other articles interesting and/or helpful: |
你好,你的来信我已收到
|
@pi0 @treboryx - I am seeing issues with this chunk of code during Cypress testing and after a production build:
this.$refs.img
is undefined when using theplaceholder
functionality, resulting in the errorCannot set properties of undefined (setting 'src')
The solutions that worked for me are:
placeholder
propthis.$refs.img
inimg.onload
The text was updated successfully, but these errors were encountered: