You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node_modules\@angular\material\material.umd.js:2028
var hasV8BreakIterator = (window.Intl && window.Intl.v8BreakIterator);
^
ReferenceError: window is not defined
Which versions of Angular, Material, OS, browsers are affected?
Running on node
Is there anything else we should know?
As a temporary fix, changing the line to const hasV8BreakIterator = ((typeof window !== 'undefined') && window.Intl && (window.Intl as any).v8BreakIterator); seems to work, but I'm not sure what that means for this platform check since node does have th v8 break iterator.
Ah, we haven't run in to that since we're only using MdDialog and it's never rendered on the server side.
For our use case, hasV8BreakIterator is the only thing that's reached that expects a browser environment
Bug, feature request, or proposal:
Bug: As of #1950,
@angular/material
no longer works with server-side rendering because 4b7e52d#diff-6d0e189ed8a75860045a39fe4c576374R7 expects window to be defined.What is the expected behavior?
No errors when loading the module
What is the current behavior?
What are the steps to reproduce?
Loading the module in a https://github.com/angular/universal project
What is the use-case or motivation for changing an existing behavior?
PR #1950 broke compatibility with node
Which versions of Angular, Material, OS, browsers are affected?
Running on node
Is there anything else we should know?
As a temporary fix, changing the line to
const hasV8BreakIterator = ((typeof window !== 'undefined') && window.Intl && (window.Intl as any).v8BreakIterator);
seems to work, but I'm not sure what that means for this platform check since node does have th v8 break iterator./cc @sattip
The text was updated successfully, but these errors were encountered: