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

small fix to prevent an error in nodejs #401

Closed PaulMaly closed 7 years ago

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 89.209% when pulling 500fff73383135615db89eedb29944f6441ad023 on PaulMaly:master into aa605501e240727a0afaef7ec1641f60c8d7e8a5 on visionmedia:master.

PaulMaly commented 7 years ago

Really? I gues not. If document is undefined, then this.title will be equal false, if document defined this.title = document.title.

You able to check it yourself: https://jsfiddle.net/t5dnmjdg/

paulocoghi commented 7 years ago

You are right :)

Thanks to take time and explain it! And sorry for my mistake.

PaulMaly commented 7 years ago

Don't worry. )) Could you please aprove this fix? We use Pagejs and want to go back to original repo soon as we can.

paulocoghi commented 7 years ago

I am not an authorized maintainer, but also a developer and user of Page.js.

My pull request is pending, too.

rstacruz commented 7 years ago

document is needed in many places, not just this one...so this wouldn't really "fix" node.js usage with just that. Nonetheless it's one step closer to getting page.js isomorphic-ready.