mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 07:08:00 +01:00
Fix cryptic error message with certain :set args.
--HG-- extra : rebase_source : f555e2cb98bea80fd1090cae6199371f0ca997ed
This commit is contained in:
@@ -30,6 +30,8 @@ update(Bookmark.prototype, {
|
|||||||
})
|
})
|
||||||
Bookmark.setter = function (key, func) this.prototype.__defineSetter__(key, func);
|
Bookmark.setter = function (key, func) this.prototype.__defineSetter__(key, func);
|
||||||
Bookmark.setter("url", function (val) {
|
Bookmark.setter("url", function (val) {
|
||||||
|
if (isString(val))
|
||||||
|
val = util.newURI(val);
|
||||||
let tags = this.tags;
|
let tags = this.tags;
|
||||||
this.tags = null;
|
this.tags = null;
|
||||||
services.bookmarks.changeBookmarkURI(this.id, val);
|
services.bookmarks.changeBookmarkURI(this.id, val);
|
||||||
|
|||||||
@@ -1082,6 +1082,7 @@ var Options = Module("options", {
|
|||||||
|
|
||||||
let opt = modules.options.parseOpt(arg, modifiers);
|
let opt = modules.options.parseOpt(arg, modifiers);
|
||||||
util.assert(opt, _("command.set.errorParsing", arg));
|
util.assert(opt, _("command.set.errorParsing", arg));
|
||||||
|
util.assert(!opt.error, _("command.set.errorParsing", opt.error));
|
||||||
|
|
||||||
let option = opt.option;
|
let option = opt.option;
|
||||||
util.assert(option != null || opt.all, _("command.set.unknownOption", opt.name));
|
util.assert(option != null || opt.all, _("command.set.unknownOption", opt.name));
|
||||||
|
|||||||
Reference in New Issue
Block a user