Skip to content

Commit

Permalink
fix(index): runaway promise (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcjfunk authored and michael-ciniawsky committed Oct 10, 2017
1 parent f512a20 commit 403f5e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Expand Up @@ -165,7 +165,7 @@ module.exports = function loader (css, map) {
* @param {String} result Result (JS Module)
* @param {Object} map Source Map
*/
return cb(null, `module.exports = ${JSON.stringify(css)}`, map)
return cb(null, `module.exports = ${JSON.stringify(css)}`, map) || null
}
/**
* @memberof loader
Expand All @@ -175,7 +175,7 @@ module.exports = function loader (css, map) {
* @param {String} css Result (Raw Module)
* @param {Object} map Source Map
*/
return cb(null, css, map)
return cb(null, css, map) || null
})
}).catch((err) => {
return err.name === 'CssSyntaxError' ? cb(new SyntaxError(err)) : cb(err)
Expand Down

0 comments on commit 403f5e2

Please sign in to comment.