1
0
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:
Doug Kearns
2014-01-11 21:21:19 +11:00
parent 357b0ac908
commit 32d5537db7

View File

@@ -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() };
}