From b1658c22223d3bea2c4b54fc546391fa53e34a93 Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Sat, 30 May 2009 18:56:13 +0000 Subject: git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@214 119bf307-c92d-0410-89bd-8f53e6181181 --- components/redirector.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'components/redirector.js') 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] + }); + } } } -- cgit v1.2.3-70-g09d2