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

Guard against document being undefined. #31

Merged
merged 1 commit into from
May 11, 2015

Conversation

rwjblue
Copy link
Contributor

@rwjblue rwjblue commented May 10, 2015

Prior to adding this guard, any applications using fastboot would throw an error on application boot (because document is undefined in Node).

The modal dialog behavior in this addon will likely not work, but the application should boot.

Prior to adding this guard, any applications using fastboot would throw an error
on application boot (because `document` is `undefined` in Node).

The modal dialog behavior in this addon will likely not work, but the application should boot.
lukemelia added a commit that referenced this pull request May 11, 2015
Guard against `document` being undefined.
@lukemelia lukemelia merged commit 819f27d into yapplabs:master May 11, 2015
@lukemelia
Copy link
Contributor

Thanks. In the future, it would be nice to figure out how to at least recover properly upon rehydration.

@rwjblue rwjblue deleted the dont-die-without-dom branch May 11, 2015 12:21
@rwjblue
Copy link
Contributor Author

rwjblue commented May 11, 2015

I think that if you avoided document, and instead used the DOMHelper instance (that is building up parts of SimpleDOM) that we wouldn't need to guard and the element would be generated as we wanted.

Unfortunately, I do not believe that the DOMHelper instance that is setup with the simple-dom instance, is public (it is available via renderer._dom).

@rwjblue rwjblue restored the dont-die-without-dom branch May 11, 2015 14:30
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

Successfully merging this pull request may close these issues.

2 participants