wnr / element-resize-detector

Optimized cross-browser resize listener for elements.
MIT License
1.32k stars 118 forks source link

'window' is not defined in SSR #112

Closed wilfredmifsud closed 5 years ago

wilfredmifsud commented 5 years ago

Hi

While testing your plugin (through ngx-ellipses), I am encountering an issue where a window is not defined error is showing while rendering the website in SSR.

From what I can see you have no checks if the window exists in the current context.

It currently shows the text "undefined" instead of the actual text.

image

I would really like it to work somehow in SSR and non-SSR version of the website.

Any help would be great