1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-31 13:55:46 +01:00

Remove some redundant uses of "new".

This commit is contained in:
Doug Kearns
2009-11-14 23:07:56 +11:00
parent 90410f2bf6
commit 52749d6722
12 changed files with 23 additions and 21 deletions

View File

@@ -201,7 +201,7 @@ const Mappings = Module("mappings", {
* @optional
*/
add: function (modes, keys, description, action, extra) {
this._addMap(new Map(modes, keys, description, action, extra));
this._addMap(Map(modes, keys, description, action, extra));
},
/**
@@ -220,7 +220,7 @@ const Mappings = Module("mappings", {
keys = keys.map(this._expandLeader);
extra = extra || {};
extra.user = true;
let map = new Map(modes, keys, description || "User defined mapping", action, extra);
let map = Map(modes, keys, description || "User defined mapping", action, extra);
// remove all old mappings to this key sequence
for (let [, name] in Iterator(map.names)) {