Merge pull request #782 from vector-im/image-view-fix

Do not render images as links if lightboxUrl is empty
This commit is contained in:
Bruno Windels 2022-07-05 14:00:53 +00:00 committed by GitHub
commit e42e76a21c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,6 @@ export class ImageView extends BaseMediaView {
title: vm => vm.label,
style: `max-width: ${vm.width}px; max-height: ${vm.height}px;`
});
return vm.isPending ? img : t.a({href: vm.lightboxUrl}, img);
return vm.isPending || !vm.lightboxUrl ? img : t.a({href: vm.lightboxUrl}, img);
}
}