Changed js code to address issue #1
Merge pull request #3 from sergiocruz/feature/no-location

Changed js code to address issue #1