Skip to content

Commit

Permalink
bug fix: when using Script.prototype.addPattern with an array of patt…
Browse files Browse the repository at this point in the history
…erns
  • Loading branch information
erikvold committed Feb 13, 2011
1 parent 5418080 commit be84ae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extension/modules/script/script.js
Expand Up @@ -276,7 +276,7 @@ Script.prototype = {
this.addPattern(((aUserVal) ? "_user" : "") + "_exclude", aPattern)),
addPattern: function(aPrefix, aPattern) {
if (!aPattern) return;
var patterns = (aPattern instanceof Array) ? aPattern : [aPattern];
var patterns = (typeof aPattern == "string") ? [aPattern] : aPattern;
for (let [, pattern] in Iterator(patterns)) {
this[aPrefix + "s"].push(pattern);
this[aPrefix + "RegExps"].push(Scriptish_convert2RegExp(pattern));
Expand Down

0 comments on commit be84ae1

Please sign in to comment.