this line..

Code:
if (loc.indexOf('localhost') != -1) {

is throwing error in Chrome ONLY (not even in Safari...)

error:

Uncaught TypeError: Cannot call method 'indexOf' of null

why is this, please... ('loc' var is fine, obviously, since no error occurs in any other browsers..)


thank you...