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 504d994 commit 86a2263Copy full SHA for 86a2263
src/shared/utils/contentful.js
@@ -12,7 +12,8 @@ export function fixStyle(style) {
12
const props = _.omitBy(style, !_.isObject);
13
const mediaQueries = _.pickBy(
14
style,
15
- (propVal, mQuery) => _.isObject(propVal) && window.matchMedia(mQuery).matches,
+ (propVal, mQuery) => _.isObject(propVal)
16
+ && isomorphy.isClientSide() && window.matchMedia(mQuery).matches,
17
);
18
const merged = _.merge(props, ..._.values(mediaQueries));
19
return merged ? _.mapKeys(merged, (value, key) => _.camelCase(key)) : undefined;
0 commit comments