Skip to content

Commit

Permalink
Merge pull request #1365 from ngochiep30051998/develop
Browse files Browse the repository at this point in the history
check undefined in createDirectory
  • Loading branch information
srod authored Jul 1, 2021
2 parents f4c8a6a + 489b2fe commit fbdbaf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const createDirectory = file => {
if (Array.isArray(file)) {
file = file[0];
}
const dir = file.substr(0, file.lastIndexOf('/'));
const dir = file && file.substr(0, file.lastIndexOf('/'));
if (!dir) {
return;
}
Expand Down

0 comments on commit fbdbaf2

Please sign in to comment.