mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-14 11:16:44 +00:00
Check Title.newFromImg produced a valid title with an extension
Bug: T140574 Change-Id: Ia818cebd47b3bce03befc547e5e435cb8b1f2996
This commit is contained in:
parent
c22a5eeadd
commit
14d9297eb1
|
@ -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