Skip to content

Commit 797a67c

Browse files
authored
Update in util.js
Brace expression is not working, if the object has single value, so I did a check to verify the object length.
1 parent 8df5cdd commit 797a67c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tasks/util/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const fontFormats = 'eot,woff2,woff,ttf,svg';
9898
* @return {Array}
9999
*/
100100
function generatedFontFiles(options) {
101-
const mask = '*.{' + options.types + '}';
101+
const mask = options.types.length > 1 ? '*.{' + options.types + '}' : '*.' + options.types;
102102

103103
return glob.sync(path.join(options.dest, options.fontFilename + mask));
104104
}

0 commit comments

Comments
 (0)