Skip to content

Commit 7756ddc

Browse files
authored
Modify error to be more informative
1 parent 4b6db63 commit 7756ddc

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/components/themr.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,7 @@ function merge(original = {}, mixin = {}) {
222222
switch (typeof originalValue) {
223223
case 'object': {
224224
//can't merge a non-object with an object
225-
if (mixinValue === '// removed by extract-text-webpack-plugin') {
226-
// when the source style is empty / contain only :global rules,
227-
// extract-text-webpack-plugin put string instead of json, which break the merge.
228-
// this if prevent this specific case
229-
// https://github.com/javivelasco/react-css-themr/issues/66
230-
break;
231-
}
232-
throw new Error(`You are merging non-object ${mixinValue} with an object ${key}`)
225+
throw new Error(`You are merging non-object ${mixinValue} with an object ${key}, (can occur when using empty or :global only base theme stylesheet)`)
233226
}
234227

235228
case 'undefined': {

0 commit comments

Comments
 (0)