[javascript] Call break in nested if statements