is fallback for images broken? Never was able to get it to work. The dynamic data is undefined but fallback is not applied.
Hello @pure_limpet. Fallback values are used when there is an error on the current dynamic value or the value is still loading.
Ref: https://docs.plasmic.app/learn/dynamic-values/#fallback-value
You can make it so that you get an error.
If your result from a query to a storage bucket is invalid,
you won’t get a url.
So you can set your photo to null if the url is not present.
If you then return the url field, you will get an error if that photo is null.
const photo = $queries.fromStorageBucket
if(!foto.signedUrl){
photo = null;
}
return photo.signedUrl;
It is also manually possible with this:
$queries.fromStorageBucket.signedUrl || (() => { throw new Error("gimme that fallback"); })()