Skip to content

Commit 61ff03c

Browse files
clydinmichael-ciniawsky
authored andcommitted
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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy