mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 16:23:49 +00:00
Merge "Check Title.newFromImg produced a valid title with an extension"
This commit is contained in:
commit
0516d0fbd4
|
@ -180,7 +180,7 @@
|
|||
link = $link.prop( 'href' ),
|
||||
alt = $thumb.attr( 'alt' );
|
||||
|
||||
if ( !( title.getExtension().toLowerCase() in bs.validExtensions ) ) {
|
||||
if ( !title || !title.getExtension() || !( title.getExtension().toLowerCase() in bs.validExtensions ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue