mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 01:12:36 +01:00
Display a more specific error when :sanitize is run without an argument.
This commit is contained in:
@@ -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