Esanders has uploaded a new change for review.
https://gerrit.wikimedia.org/r/293960
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(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/60/293960/1
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: newchange
Gerrit-Change-Id: I3e05556e68f5a75eb487613f3e4fe4ea4d21b849
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits