Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ function sassLoader(content) {
addNormalizedDependency
));

// Skip empty files, otherwise it will stop webpack, see issue #21
if (options.data.trim() === "") {
callback(null, "");
Copy link
Contributor

Choose a reason for hiding this comment

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

if (options.data.trim() === "") return callback(null, "");

? 🙃

Copy link
Member Author

Choose a reason for hiding this comment

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

Noooo, I don't like that style (and my global eslint complains about inconsistent return values) 😁

Copy link
Contributor

Choose a reason for hiding this comment

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

😢

return;
}

// start the actual rendering
asyncSassJobQueue.push(options, (err, result) => {
if (err) {
Expand Down