img src bind undefined inside a v-if guard #245
              
                Unanswered
              
          
                  
                    
                      adamk33n3r
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Here's a fiddle describing the issue: https://jsfiddle.net/30qc89ap/1/
If you have a
v-ifto check if your image source, if it becomes undefined, the image element still tries to fetch it. so every time it becomes undefined i get a fetch for/undefined. This doesn't seem to happen in Vue but it does here. Is there a reasonable workaround for this? Obviously I could fallback to an image...but that's not ideal as what image would be appropriate? Maybe I should add a 1px image to my project to use as fallback lolBeta Was this translation helpful? Give feedback.
All reactions