Skip to content

Commit 8df20ce

Browse files
mcjfunkmichael-ciniawsky
authored andcommittedOct 10, 2017
fix(index): runaway promise (#269)
1 parent 44f01bb commit 8df20ce

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎lib/index.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ 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) || null
168+
cb(null, `module.exports = ${JSON.stringify(css)}`, map)
169+
170+
return null
169171
}
170172
/**
171173
* @memberof loader
@@ -175,7 +177,9 @@ module.exports = function loader (css, map) {
175177
* @param {String} css Result (Raw Module)
176178
* @param {Object} map Source Map
177179
*/
178-
return cb(null, css, map) || null
180+
cb(null, css, map)
181+
182+
return null
179183
})
180184
}).catch((err) => {
181185
return err.name === 'CssSyntaxError' ? cb(new SyntaxError(err)) : cb(err)

0 commit comments

Comments
 (0)