Skip to content

Commit 7ae6190

Browse files
author
Jeffrey Mclean
committed
Fix for runaway promise
1 parent 753dea7 commit 7ae6190

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ module.exports = function loader (css, map) {
165165
* @param {String} result Result (JS Module)
166166
* @param {Object} map Source Map
167167
*/
168-
return cb(null, `module.exports = ${JSON.stringify(css)}`, map)
168+
return cb(null, `module.exports = ${JSON.stringify(css)}`, map) || null
169169
}
170170
/**
171171
* @memberof loader
@@ -175,7 +175,7 @@ module.exports = function loader (css, map) {
175175
* @param {String} css Result (Raw Module)
176176
* @param {Object} map Source Map
177177
*/
178-
return cb(null, css, map)
178+
return cb(null, css, map) || null
179179
})
180180
}).catch((err) => {
181181
return err.name === 'CssSyntaxError' ? cb(new SyntaxError(err)) : cb(err)

0 commit comments

Comments
 (0)