Mooeypoo has uploaded a new change for review.

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

Change subject: Ignore empty strings in array union
......................................................................

Ignore empty strings in array union

Make sure that oo.simpleArrayUnion ignores empty strings inside
arrays when merging.

Change-Id: Ie24be3a9fb2d41c2b4aafa147af53760ab4203a1
---
M src/core.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/01/169201/1

diff --git a/src/core.js b/src/core.js
index 1d3c9e4..3f91390 100644
--- a/src/core.js
+++ b/src/core.js
@@ -374,7 +374,7 @@
        for ( i = 0, ilen = arguments.length; i < ilen; i++ ) {
                arr = arguments[i];
                for ( j = 0, jlen = arr.length; j < jlen; j++ ) {
-                       if ( !obj[ arr[j] ] ) {
+                       if ( !obj[ arr[j] ] && arr[j] !== '' ) {
                                obj[ arr[j] ] = true;
                                result.push( arr[j] );
                        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie24be3a9fb2d41c2b4aafa147af53760ab4203a1
Gerrit-PatchSet: 1
Gerrit-Project: oojs/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>

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

Reply via email to