Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window undefined #7

Closed
Harris-Liu opened this issue Aug 23, 2016 · 2 comments
Closed

window undefined #7

Harris-Liu opened this issue Aug 23, 2016 · 2 comments

Comments

@Harris-Liu
Copy link

exports["default"] = new EventDispatcher(window);
^
ReferenceError: window is not defined

when compile, render at server have no window object.

please do a check before use it. like this

if (typeof window !== 'undefined') {
exports["default"] = new EventDispatcher(window);
} else {
exports["default"] = new EventDispatcher();
}

@jljsj33
Copy link
Member

jljsj33 commented Aug 24, 2016

额。。好吧。。。

@jljsj33
Copy link
Member

jljsj33 commented Aug 24, 2016

0.3.6

@jljsj33 jljsj33 closed this as completed Aug 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants