You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: input must be a string (received undefined: undefined)
In my VS Code, It shows that src is optional and can be string or undefined , but if I actually use undefined I get this error.
My TypeScript was broked?
update: const imageUrl = ref<string>(""); also don't work and get error.
I had a similar problem too. Quite by accident, I discovered that adding the parameter: placeholder with the correct url link will display this placeholder image instead of an error if src is empty or has values not defined correctly. It's not a perfect solution but it works.
Version
Issue
ERROR:
input must be a string (received undefined: undefined)
In my VS Code, It shows that src is optional and can be string or undefined , but if I actually use undefined I get this error.
My TypeScript was broked?
update:
const imageUrl = ref<string>("");
also don't work and get error.Minimal Reproduction
Source Code: https://github.com/cfdxkk/nuxt-image-undefined-src
or
The text was updated successfully, but these errors were encountered: