diff --git a/common/content/completion.js b/common/content/completion.js index 71c2ad7c..c7906969 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -1662,7 +1662,8 @@ function Completion() //{{{ completer = function () [["true", ""], ["false", ""]]; break; case "stringlist": - len = newValues.pop().length; + let target = newValues.pop(); + len = target ? target.length : 0; break; case "charlist": len = 0; diff --git a/common/content/options.js b/common/content/options.js index 7b5b3592..f997a697 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -80,7 +80,7 @@ Option.prototype = { parseValues: function (value) { if (this.type == "stringlist") - return value.split(","); + return (value === "") ? [] : value.split(","); if (this.type == "charlist") return Array.slice(value); return value;