Skip to content

Commit 4c67f03

Browse files
gongpeionedevongovett
authored andcommitted
Fix: Error when scss file is empty #327 (#340)
* 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.
1 parent 127c9b7 commit 4c67f03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Asset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Asset {
5151
async getDependencies() {
5252
await this.loadIfNeeded();
5353

54-
if (this.mightHaveDependencies()) {
54+
if (this.contents && this.mightHaveDependencies()) {
5555
await this.parseIfNeeded();
5656
this.collectDependencies();
5757
}

0 commit comments

Comments
 (0)