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

Prevent NotRenderedError when rendering empty file #118

Closed
wants to merge 1 commit into from

Conversation

botandrose
Copy link

@loaded_urls remains nil if the @template is "", and thus calling dependencies raises NotRenderedError, rather than returning empty array, as it should.

@loaded_urls remains nil if the `@template` is "", and thus calling `dependencies` raises `NotRenderedError`, rather than returning empty array, as it should.
@ntkme
Copy link
Member

ntkme commented Jan 20, 2025

It was implemented this way to closely match the original (and buggy) behavior of sassc gem, but it's probably better to fix it as you have hit this issue in the real world.

Also, same problem could happen to source map.

#119 fixes both cases. The fix has been released with 1.80.2.

@botandrose botandrose deleted the patch-1 branch January 20, 2025 20:08
@botandrose
Copy link
Author

@ntkme Amazing, thank you for the quick response and release!

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