Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/core/compatibility/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class CompatibilityModule {
}

constructor(@Optional() @Inject(DOCUMENT) document: any) {
if (isDevMode() && typeof document && !document.doctype) {
if (isDevMode() && document && !document.doctype) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't just document by itself potentially be an issue for Universal? typeof document == 'object'?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't, because it'll hit the parameter, before it tries to look for it globally.

console.warn(
'Current document does not have a doctype. This may cause ' +
'some Angular Material components not to behave as expected.'
Expand Down