From: jenkins-bot Date: Thu, 20 Sep 2018 07:58:03 +0000 (+0000) Subject: Merge "resourceloader: Simplify StringSet fallback" X-Git-Tag: 1.34.0-rc.0~4046 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=2f5d88819799f077f4d3a3288dad104141692f20;hp=fc2a88f66642590dda149590bdb72c5fc9ab5795 Merge "resourceloader: Simplify StringSet fallback" --- diff --git a/resources/src/startup/mediawiki.js b/resources/src/startup/mediawiki.js index 97fc02783a..fee69c07bf 100644 --- a/resources/src/startup/mediawiki.js +++ b/resources/src/startup/mediawiki.js @@ -48,22 +48,19 @@ function defineFallbacks() { // - StringSet = window.Set || ( function () { - /** - * @private - * @class - */ - function StringSet() { - this.set = Object.create( null ); - } - StringSet.prototype.add = function ( value ) { - this.set[ value ] = true; + /** + * @private + * @class + */ + StringSet = window.Set || function StringSet() { + var set = Object.create( null ); + this.add = function ( value ) { + set[ value ] = true; }; - StringSet.prototype.has = function ( value ) { - return value in this.set; + this.has = function ( value ) { + return value in set; }; - return StringSet; - }() ); + }; } /**