mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-08 09:34:12 +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)
|
if (args.bang)
|
||||||
dactyl.assert(args.length == 0, _("error.trailingCharacters"));
|
dactyl.assert(args.length == 0, _("error.trailingCharacters"));
|
||||||
else {
|
else {
|
||||||
|
dactyl.assert(args.length, _("error.argumentRequired"));
|
||||||
dactyl.assert(opt.validator(args), _("error.invalidArgument"));
|
dactyl.assert(opt.validator(args), _("error.invalidArgument"));
|
||||||
opt = { __proto__: opt, value: args.slice() };
|
opt = { __proto__: opt, value: args.slice() };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user