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
This commit is contained in:
Thalia 2015-10-01 21:09:50 +01:00
parent 7241d5d3a7
commit d81a1ff7ad
1 changed files with 1 additions and 1 deletions

View File

@ -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 */