visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

Added a check for window existence before accessing location property. #455

Closed zinigor closed 6 years ago

zinigor commented 6 years ago

This change was introduced in #443. In some environments where window is not available it causes an attempt to access a property of window.location, which leads to an error.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 91.429% when pulling b92ba14b991ee09a912daeaeb63e15eb73d46161 on zinigor:add/window-check into 7bc0ee32bce68c6d0bf3d9ba9193501ff28a7640 on visionmedia:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 91.429% when pulling b92ba14b991ee09a912daeaeb63e15eb73d46161 on zinigor:add/window-check into 7bc0ee32bce68c6d0bf3d9ba9193501ff28a7640 on visionmedia:master.

matthewp commented 6 years ago

Thanks. This is why I really want to get some Node.js tests in, so this doesn't get accidentally broken all of the time.

matthewp commented 6 years ago

Released as 1.8.1