You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Immutable from 'seamless-immutable';
export const initialState = Immutable({
sidebarOpened: false,
isMobile: false
})
export default function layout (state = initialState, action) {
switch (action.type) {
case commonTypes.APP_INIT:
{
let isMobile = false
if(!SERVER){
let { innerWidth } = window
isMobile = innerWidth < 1025 // 1024px - is the main breakpoint in ui
}
return state.merge({
isMobile: isMobile
})
}
default: return state
}
}
}
it works fine in development but when I bundle/build for production I get the following error - not sure why - any ideas?
Uncaught TypeError: e.merge is not a function
at r (browser.b704458….js:1)
at vendor.d1edc2b….js:1
at f (vendor.d1edc2b….js:1)
at r (vendor.d1edc2b….js:1)
at vendor.d1edc2b….js:1
at r (vendor.d1edc2b….js:1)
at r (browser.b704458….js:1)
at Object.<anonymous> (browser.b704458….js:1)
at Object.TBTs (browser.b704458….js:1)
at r (manifest.d41d8cd….js:1)
r @ browser.b704458….js:1
(anonymous) @ vendor.d1edc2b….js:1
f @ vendor.d1edc2b….js:1
r @ vendor.d1edc2b….js:1
(anonymous) @ vendor.d1edc2b….js:1
r @ vendor.d1edc2b….js:1
r @ browser.b704458….js:1
(anonymous) @ browser.b704458….js:1
TBTs @ browser.b704458….js:1
r @ manifest.d41d8cd….js:1
0 @ browser.b704458….js:1
r @ manifest.d41d8cd….js:1
window.webpackJsonp @ manifest.d41d8cd….js:1
(anonymous) @ browser.b704458….js:1
which is triggered here:
function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;switch(arguments[1].type){case i.a:var t=!1;return t=1025>window.innerWidth,e.merge({isMobile:t});
The text was updated successfully, but these errors were encountered:
@rtfeldman any idea what might be going on here? Here is some more info from dev tools... looks to me like e is definitely a function... not sure how to debug it further?
Hey, any update on this? I'm facing a similar issue with the react-native release build. Debug build works fine. @tsdexter did you find anything?
using v7.1.2
I have code like this:
it works fine in development but when I bundle/build for production I get the following error - not sure why - any ideas?
which is triggered here:
The text was updated successfully, but these errors were encountered: