Inez has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/64643


Change subject: Fix for check if data is balanced.
......................................................................

Fix for check if data is balanced.

Previous check wouldn't make sense, cause the last offset in the data could be 
that one that makes data balanced (and j is increased always after iteration).


Change-Id: Ie9498d0ac9e3417d09b8b3043bf3281e7dfbf9db
---
M modules/ve/dm/ve.dm.Converter.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/43/64643/1

diff --git a/modules/ve/dm/ve.dm.Converter.js b/modules/ve/dm/ve.dm.Converter.js
index 0bb23bd..fdc6e0f 100644
--- a/modules/ve/dm/ve.dm.Converter.js
+++ b/modules/ve/dm/ve.dm.Converter.js
@@ -973,7 +973,7 @@
                                }
                                j++;
                        }
-                       if ( j >= data.length ) {
+                       if ( depth !== 0 ) {
                                throw new Error( 'Unbalanced data: looking for 
closing /' +
                                        dataElement.type );
                        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9498d0ac9e3417d09b8b3043bf3281e7dfbf9db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Inez <[email protected]>

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

Reply via email to