« Return to Thread: Script errors in with Firefox 3.5 / Opencms 7.0.5

Re: Script errors in with Firefox 3.5 / Opencms 7.0.5

by Roman Uhlig :: Rate this Message:

Reply to Author | View in Thread

To me it seems it's only happening in the following scenario, when you use a not declared variable with the same identifier in alternative parts of a javascript script, e.g.:

if (true) {
  v1 = 'a';
} else {
  v1 = 'b';
}

while this is working fine:

var v1;
if (true) {
  v1 = 'a';
} else {
  v1 = 'b';
}

Best regards,
Roman

 « Return to Thread: Script errors in with Firefox 3.5 / Opencms 7.0.5