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