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

insertStyle no longer throws a fatal error when window is undefined #88

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

dr-skot
Copy link
Contributor

@dr-skot dr-skot commented Sep 28, 2021

Hi,

sass({ insert: true }) was breaking the build in my nextjs project because the if (!window) check in style.ts throws a fatal error when window is not defined.

I changed the check back to if (typeof window === 'undefined'), which is what it used to be in an earlier version.

Thanks,
S

Copy link
Owner

@elycruz elycruz left a comment

Choose a reason for hiding this comment

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

Ok, gotcha - yeah that would throw an error in node environment with specific testing/runtime setup).
Changes look good - Will release the update in package version 1.2.9. (end of day today (09/28)).

@elycruz elycruz merged commit efaccdc into elycruz:master Sep 28, 2021
elycruz added a commit that referenced this pull request Sep 28, 2021
@elycruz
Copy link
Owner

elycruz commented Sep 28, 2021

Update merged and released at package version 1.2.9 (@dr-skot):
https://www.npmjs.com/package/rollup-plugin-sass/v/1.2.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants