From 3d1f59aaaabb88807e4dfbe87dcaea4384e045ad Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 3 Jan 2018 09:21:04 -0500 Subject: [PATCH] fix(index): copy loader options before modifying --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index c3b03fbc..a4ef3a90 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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') @@ -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':