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. #457

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.

This is a repeat of #455 because I edited the wrong file previously.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 91.429% when pulling 9461b310ba39a8e47ff81dd0c0a3d29b2b1983fe on zinigor:add/window-check-2 into 0b4031c7de23939eeec135e08a796b92a6c4b440 on visionmedia:master.

matthewp commented 6 years ago

Released as 1.8.2