Skip to content

Commit

Permalink
fix(index): copy loader options before modifying
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin committed Jan 3, 2018
1 parent b9c1add commit 3d1f59a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const SyntaxError = require('./Error')
* @return {cb} cb Result
*/
module.exports = function loader (css, map) {
const options = loaderUtils.getOptions(this) || {}
const options = Object.assign({}, loaderUtils.getOptions(this))

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

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

Promise.resolve().then(() => {
const length = Object.keys(options)
.filter((option) => {
.filter((option) => {
switch (option) {
// case 'exec':
case 'ident':
Expand Down

0 comments on commit 3d1f59a

Please sign in to comment.