mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 18:24:11 +01:00
Fix a wrong reference.
This commit is contained in:
4
common/content/autocommands.js
Normal file → Executable file
4
common/content/autocommands.js
Normal file → Executable file
@@ -31,12 +31,14 @@ const AutoCommands = Module("autocommands", {
|
||||
* @param {string} cmd The Ex command to run.
|
||||
*/
|
||||
add: function (events, regex, cmd) {
|
||||
let self = this;
|
||||
|
||||
if (typeof events == "string") {
|
||||
events = events.split(",");
|
||||
liberator.log("DEPRECATED: the events list arg to autocommands.add() should be an array of event names");
|
||||
}
|
||||
events.forEach(function (event) {
|
||||
this._store.push(new AutoCommand(event, RegExp(regex), cmd));
|
||||
self._store.push(new AutoCommand(event, RegExp(regex), cmd));
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user