mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-16 21:23:41 +01:00
Use Object.keys/getOwnPropertyNames (and provide them if they don't exist).
This commit is contained in:
@@ -167,7 +167,7 @@ const AutoCommands = Module("autocommands", {
|
||||
|
||||
if (event) {
|
||||
// NOTE: event can only be a comma separated list for |:au {event} {pat} {cmd}|
|
||||
let validEvents = keys(config.autocommands);
|
||||
let validEvents = Object.keys(config.autocommands);
|
||||
validEvents.push("*");
|
||||
|
||||
events = event.split(",");
|
||||
@@ -227,7 +227,7 @@ const AutoCommands = Module("autocommands", {
|
||||
|
||||
let [event, url] = args;
|
||||
let defaultURL = url || buffer.URL;
|
||||
let validEvents = keys(config.autocommands);
|
||||
let validEvents = Object.keys(config.autocommands);
|
||||
|
||||
// TODO: add command validators
|
||||
dactyl.assert(event != "*",
|
||||
|
||||
Reference in New Issue
Block a user