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

Platform-server : TypeError: Cannot read property 'dir' of undefined #5233

Closed
mahmood-sajjadi opened this issue Jun 20, 2017 · 1 comment · Fixed by #5234
Closed

Platform-server : TypeError: Cannot read property 'dir' of undefined #5233

mahmood-sajjadi opened this issue Jun 20, 2017 · 1 comment · Fixed by #5234
Assignees

Comments

@mahmood-sajjadi
Copy link

Bug, feature request, or proposal:

BUG

What is the expected behavior?

Material should work with platform-server

What is the current behavior?

TypeError: Cannot read property 'dir' of undefined

What are the steps to reproduce?

Please look the next section for source of issue

What is the use-case or motivation for changing an existing behavior?

platform-server

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

material: 2.0.0-beta.7
angular: 4.1.2

Is there anything else we should know?

https://github.com/angular/material2/blob/master/src/lib/core/bidi/directionality.ts#L50
in platform-server: _document.documentElement is undefined so _document.documentElement.dir is rasing an error

@crisbeto crisbeto self-assigned this Jun 20, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Jun 20, 2017
Fixes null pointer error in the directionality service on `platform-server`.

Fixes angular#5233.
devversion added a commit to devversion/material2 that referenced this issue Jun 20, 2017
* The prerender script that runs on the CI did not exit with a proper error-code when the `renderModuleFactory` failed due to errors like in angular#5233
jelbourn pushed a commit that referenced this issue Jun 20, 2017
* The prerender script that runs on the CI did not exit with a proper error-code when the `renderModuleFactory` failed due to errors like in #5233
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants