GWicke has uploaded a new change for review.
https://gerrit.wikimedia.org/r/70746
Change subject: Trivial: Use inline function instead of var
......................................................................
Trivial: Use inline function instead of var
I had moved this to a var to avoid a JSHint warning, but that was actually
caused by the outer loop instead of forEach. A comment silences that one, so
move the inline function back.
Change-Id: I864fae6963cd775fb3c76a9c8bd5a94bf6a736a4
---
M js/lib/mediawiki.DOMPostProcessor.js
1 file changed, 6 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid
refs/changes/46/70746/1
diff --git a/js/lib/mediawiki.DOMPostProcessor.js
b/js/lib/mediawiki.DOMPostProcessor.js
index b591bfe..05b804a 100644
--- a/js/lib/mediawiki.DOMPostProcessor.js
+++ b/js/lib/mediawiki.DOMPostProcessor.js
@@ -1445,14 +1445,13 @@
}
// Extract the key orders for the templates
+ var keyArrays = [];
/* jshint loopfunc: true */ // yes, this
function is in a loop
- var keyArrays = [],
- pushKey = function(a) {
- if(a.keys) {
- keyArrays.push(a.keys);
- }
- };
- tplArray.forEach(pushKey);
+ tplArray.forEach(function(a) {
+ if(a.keys) {
+ keyArrays.push(a.keys);
+ }
+ });
// Map the array of { dsr: .. , args: .. }
objects to just the args property
/* jshint loopfunc: true */ // yes, this
function is in a loop
--
To view, visit https://gerrit.wikimedia.org/r/70746
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I864fae6963cd775fb3c76a9c8bd5a94bf6a736a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits