Add check for null.

This commit is contained in:
rjc%netscape.com 1999-09-03 23:02:09 +00:00
parent 230818972e
commit 260f384c92
2 changed files with 2 additions and 8 deletions

View File

@ -74,7 +74,7 @@ function Init()
if (value) value = value.QueryInterface(Components.interfaces.nsIRDFLiteral);
if (value) value = value.Value;
if (value != "")
if ((value) && (value != ""))
{
var sep;
@ -111,9 +111,6 @@ function Init()
endHour = hours.substr(dashSep + 1, hours.length-1);
}
dump("start: " + startHour + "\n");
dump("end: " + endHour + "\n");
// set start hour
var startHourNode = document.getElementById("startHourRange");
for (var x=0; x < startHourNode.options.length; x++)

View File

@ -74,7 +74,7 @@ function Init()
if (value) value = value.QueryInterface(Components.interfaces.nsIRDFLiteral);
if (value) value = value.Value;
if (value != "")
if ((value) && (value != ""))
{
var sep;
@ -111,9 +111,6 @@ function Init()
endHour = hours.substr(dashSep + 1, hours.length-1);
}
dump("start: " + startHour + "\n");
dump("end: " + endHour + "\n");
// set start hour
var startHourNode = document.getElementById("startHourRange");
for (var x=0; x < startHourNode.options.length; x++)