new MediaQueryPlugin({
include: true,
queries: {
'screen and (min-width: 1000px)': 'desktop'
},
groups: {
app: /^example/
}
});
modules that doesn't get matched with group RegExp throws TypeError:
(node:31262) UnhandledPromiseRejectionWarning: TypeError: group.indexOf is not a function
at /Users/david/Projects/new/app:1:48
at getGroupName (/Users/david/Projects/new/node_modules/media-query-plugin/src/postcss.js:29:52)
at callback (/Users/david/Projects/new/node_modules/media-query-plugin/src/postcss.js:42:35)
...
Seems typeof group === 'object' guard on line 29 of src/postcss.js should be more stricter and check if group is array. Regexps are object and when their names does not get match on previous line, pass this guard and get to group.indexOf which obviously does not exist on regular expressions.
When using with the following config:
modules that doesn't get matched with group RegExp throws TypeError:
Seems
typeof group === 'object'
guard on line 29 ofsrc/postcss.js
should be more stricter and check if group is array. Regexps are object and when their names does not get match on previous line, pass this guard and get togroup.indexOf
which obviously does not exist on regular expressions.