Skip to content
This repository was archived by the owner on Feb 21, 2021. It is now read-only.

Commit b29c9a0

Browse files
committed
Refs #264 - Use array where Set/Map is not necessary
1 parent 94a39a0 commit b29c9a0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/notificationHelper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ const displayMethods = new Map([
3636
]);
3737
const defaultDisplayMethods = ["popup"];
3838

39-
const linkPlaceholders = new Set([
39+
const linkPlaceholders = [
4040
["LANG", () => browser.i18n.getUILanguage().replace("-", "_")],
4141
["ADDON_NAME", () => info.addonName],
4242
["ADDON_VERSION", () => info.addonVersion],
4343
["APPLICATION_NAME", () => info.application],
4444
["APPLICATION_VERSION", () => info.applicationVersion],
4545
["PLATFORM_NAME", () => info.platform],
4646
["PLATFORM_VERSION", () => info.platformVersion]
47-
]);
47+
];
4848

4949
// We must hard code any "abp:" prefixed notification links here, otherwise
5050
// notifications linking to them will not be displayed at all.

lib/uninstall.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ const {recommendations} = require("../adblockpluscore/lib/recommendations");
2727
const {isDataCorrupted} = require("./subscriptionInit");
2828
const {Prefs} = require("./prefs");
2929

30-
const abbreviations = new Map([
30+
const abbreviations = [
3131
["an", "addonName"], ["av", "addonVersion"],
3232
["ap", "application"], ["apv", "applicationVersion"],
3333
["p", "platform"], ["fv", "firstVersion"], ["pv", "platformVersion"],
3434
["ndc", "notificationDownloadCount"], ["c", "corrupted"],
3535
["s", "subscriptions"]
36-
]);
36+
];
3737

3838
/**
3939
* Retrieves set of URLs of recommended ad blocking filter lists

0 commit comments

Comments
 (0)