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.
2 parents 0ebcd26 + b990344 commit dc05951Copy full SHA for dc05951
index.js
@@ -189,6 +189,9 @@ function localizeDecl(decl, context) {
189
}
190
191
module.exports = postcss.plugin('postcss-modules-local-by-default', function (options) {
192
+ if (typeof options !== 'object') {
193
+ options = {}; // If options is undefined or not an object the plugin fails
194
+ }
195
if(options && options.mode) {
196
if(options.mode !== "global" && options.mode !== "local" && options.mode !== "pure") {
197
throw new Error("options.mode must be either 'global', 'local' or 'pure' (default 'local')");
0 commit comments