1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 21:15:47 +01:00

Fix more cross-window object issues.

This commit is contained in:
Kris Maglione
2014-02-21 22:09:40 -08:00
parent 606ea93d46
commit b6fbf2751a
3 changed files with 24 additions and 12 deletions

View File

@@ -1000,11 +1000,10 @@ var CommandLine = Module("commandline", {
if (privateData == "never-save")
return;
this.store = this.store.filter(line => (line.value || line) != str);
dactyl.trapErrors(function () {
this.store.push({ value: str, timestamp: Date.now() * 1000, privateData: privateData });
}, this);
this.store = this.store.slice(Math.max(0, this.store.length - options["history"]));
let store = Array.filter(this.store, line => (line.value || line) != str);
dactyl.trapErrors(
() => store.push({ value: str, timestamp: Date.now() * 1000, privateData: privateData }));
this.store = store.slice(Math.max(0, store.length - options["history"]));
},
/**
* @property {function} Returns whether a data item should be