Skip to content

Commit

Permalink
Fix: Error when scss file is empty #327 (#340)
Browse files Browse the repository at this point in the history
* Fix: Error when scss file is empty #327

* Return empty string when code is empty

* Handling empty files

* No need to load in mightHaveDependencies()

* mightHaveDependencies doesn't run if this.contents is empty.
  • Loading branch information
gongpeione authored and devongovett committed Dec 30, 2017
1 parent 127c9b7 commit 4c67f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Asset {
async getDependencies() {
await this.loadIfNeeded();

if (this.mightHaveDependencies()) {
if (this.contents && this.mightHaveDependencies()) {
await this.parseIfNeeded();
this.collectDependencies();
}
Expand Down

0 comments on commit 4c67f03

Please sign in to comment.