rhino if clause not being detected

while running Rhino, envJS and Jasmine, r.js is not entering into the rhino if clause but it is entering the browser if clause as the navigator object is not null and the document property is not null  too (it contains the html spec). so i figured it out by moving the browser if clause to the end. Also ive posted a note to r.js github project without any response yet.