aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/redirector.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/components/redirector.js b/components/redirector.js
index aa86bea..09ef35e 100644
--- a/components/redirector.js
+++ b/components/redirector.js
@@ -42,15 +42,17 @@ function RedirectorPolicy() {
data = this.prefBranch.getCharPref('redirects');
var arr;
this.list = [];
- for each (redirectString in data.split(':::')) {
- arr = redirectString.split(',,,');
- this.list.push({
- exampleUrl : arr[0],
- pattern : arr[1],
- redirectUrl : arr[2],
- patternType : arr[3],
- excludePattern : arr[4]
- });
+ if (data != '') {
+ for each (redirectString in data.split(':::')) {
+ arr = redirectString.split(',,,');
+ this.list.push({
+ exampleUrl : arr[0],
+ pattern : arr[1],
+ redirectUrl : arr[2],
+ patternType : arr[3],
+ excludePattern : arr[4]
+ });
+ }
}
}