From c67c1f714d89e81f2fb56459271b1d3d3fa67457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Inez=20Korczyn=CC=81ski?= Date: Thu, 6 Jun 2013 13:49:29 -0700 Subject: [PATCH] For performance reasons use classes collection instead of jQuery.hasClass Change-Id: Id64a58d71c49ad74c55e3a24b86955ece668ebba --- modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js b/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js index ff43a6f19c..19b5597478 100644 --- a/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js +++ b/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js @@ -78,7 +78,7 @@ ve.dm.MWBlockImageNode.static.toDataElement = function ( domElements, converter } // Default-size - if ( $figure.hasClass( 'mw-default-size' ) ) { + if ( classes.indexOf( 'mw-default-size' ) !== -1 ) { attributes.defaultSize = true; } @@ -152,4 +152,4 @@ ve.dm.MWBlockImageNode.static.toDomElements = function ( data, doc, converter ) /* Registration */ -ve.dm.modelRegistry.register( ve.dm.MWBlockImageNode ); \ No newline at end of file +ve.dm.modelRegistry.register( ve.dm.MWBlockImageNode );