mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-16 23:22:30 +02:00
Display a more specific error when :sanitize is run without an argument.
This commit is contained in:
1 parent
357b0ac908
commit
32d5537db7
1 file changed
+1
@@ -446,6 +446,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
||||
if (args.bang)
|
||||
dactyl.assert(args.length == 0, _("error.trailingCharacters"));
|
||||
else {
|
||||
dactyl.assert(args.length, _("error.argumentRequired"));
|
||||
dactyl.assert(opt.validator(args), _("error.invalidArgument"));
|
||||
opt = { __proto__: opt, value: args.slice() };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user