bikecoders / ngx-sticky

Angular directive that adds sticky position to an HTML element and also applies and remove a custom class when the element is sticky positioned.
https://bikecoders.github.io/ngx-sticky/
10 stars 3 forks source link

fix: ssr exception in runtime #19

Closed osnoser1 closed 4 years ago

osnoser1 commented 5 years ago

PR Type

What kind of change does this PR introduce?

What is the current behavior?

In SSR runtime occurs two exceptions: window and document is not defined.

Issue Number: #18

What is the new behavior?

All exceptions are gone in ssr.

Does this PR introduce a breaking change?

Other information

This PR has two commits:

Closes #18

dianjuar commented 4 years ago

@osnoser1 can you please describe the PR? You can use the Angular PR template to do that.

I have no experience on this field and would be nice to have an explanation instead of reading code to understand what was wrong

osnoser1 commented 4 years ago

Done @dianjuar 👍🏼

dianjuar commented 4 years ago

@osnoser1 Your PR is just awesome!

I will run Unit Test and Sonar Analysis (I now, I now, the CI should be doing this)and tell you how it went.

If nothing happens I will integrate your PR.

THANK YOU!!!!!