We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c0805c commit 5874601Copy full SHA for 5874601
index.js
@@ -92,12 +92,10 @@ const filterVariables = (sassFilesString, variables) => {
92
const parseOptions = (opts = {}) => {
93
const options = { ...defaultOptions, ...opts };
94
95
- if (Boolean(options.ignore) && !Array.isArray(options.ignore)) {
96
- throw new TypeError('`ignore` should be an Array');
97
- }
98
-
99
- if (Boolean(options.ignoreFiles) && !Array.isArray(options.ignoreFiles)) {
100
- throw new TypeError('`ignoreFiles` should be an Array');
+ for (const option of ['ignore', 'ignoreFiles']) {
+ if (!Array.isArray(options[option])) {
+ throw new TypeError(`\`${option}\` should be an Array`);
+ }
101
}
102
103
// Trim list of ignored variables
0 commit comments