From d81a1ff7ad6476574408c786607f61c92a36a8ab Mon Sep 17 00:00:00 2001 From: Thalia Date: Thu, 1 Oct 2015 21:09:50 +0100 Subject: [PATCH] Fix the check for the error class in generated content Check the root of the generated content for the 'error' class as well as the children. Change-Id: I29044b5bfc33ce250c415a54d6c56f0620680658 --- modules/ve-math/ve.ce.MWMathNode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-math/ve.ce.MWMathNode.js b/modules/ve-math/ve.ce.MWMathNode.js index f126143..7031d4f 100644 --- a/modules/ve-math/ve.ce.MWMathNode.js +++ b/modules/ve-math/ve.ce.MWMathNode.js @@ -49,7 +49,7 @@ ve.ce.MWMathNode.prototype.onSetup = function () { * @inheritdoc ve.ce.GeneratedContentNode */ ve.ce.MWMathNode.prototype.validateGeneratedContents = function ( $element ) { - return !( $element.find( '.error' ).length ); + return !( $element.find( '.error' ).addBack( '.error' ).length ); }; /* Registration */