From 14d9297eb14afa69a2fe7c8e700710f9ef893e6f Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 18 Jul 2016 13:34:24 +0100 Subject: [PATCH] Check Title.newFromImg produced a valid title with an extension Bug: T140574 Change-Id: Ia818cebd47b3bce03befc547e5e435cb8b1f2996 --- resources/mmv/mmv.bootstrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js index 870033021..5d972fdaf 100644 --- a/resources/mmv/mmv.bootstrap.js +++ b/resources/mmv/mmv.bootstrap.js @@ -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; }