Skip to content

Commit 61ff03c

Browse files
clydinmichael-ciniawsky
authored andcommittedJan 3, 2018
fix(index): copy loader options before modifying (#326)
1 parent b9c1add commit 61ff03c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const SyntaxError = require('./Error')
4040
* @return {cb} cb Result
4141
*/
4242
module.exports = function loader (css, map) {
43-
const options = loaderUtils.getOptions(this) || {}
43+
const options = Object.assign({}, loaderUtils.getOptions(this))
4444

4545
validateOptions(require('./options.json'), options, 'PostCSS Loader')
4646

@@ -51,7 +51,7 @@ module.exports = function loader (css, map) {
5151

5252
Promise.resolve().then(() => {
5353
const length = Object.keys(options)
54-
.filter((option) => {
54+
.filter((option) => {
5555
switch (option) {
5656
// case 'exec':
5757
case 'ident':

0 commit comments

Comments
 (0)