jenkins-bot has submitted this change and it was merged.

Change subject: Don't fatal when comments are copied
......................................................................


Don't fatal when comments are copied

Bug: T136908
Change-Id: I3e05556e68f5a75eb487613f3e4fe4ea4d21b849
---
M src/dm/ve.dm.Node.js
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/dm/ve.dm.Node.js b/src/dm/ve.dm.Node.js
index 038bea8..004995e 100644
--- a/src/dm/ve.dm.Node.js
+++ b/src/dm/ve.dm.Node.js
@@ -348,7 +348,8 @@
                // more generic and specify the #mwt pattern in MW code.
                about = '#mwt' + Math.floor( 1000000000 * Math.random() );
                for ( i = 0, len = clone.originalDomElements.length; i < len; 
i++ ) {
-                       if ( clone.originalDomElements[ i ].hasAttribute( 
'about' ) ) {
+                       // Check for hasAttribute as comments don't have them
+                       if ( clone.originalDomElements[ i ].hasAttribute && 
clone.originalDomElements[ i ].hasAttribute( 'about' ) ) {
                                clone.originalDomElements[ i ].setAttribute( 
'about', about );
                        }
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/293960
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e05556e68f5a75eb487613f3e4fe4ea4d21b849
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to