-- TypeError: Cannot read properties of undefined (reading 'Brand')
at MixpanelMain.getMetaData (mixpanel-main.js:44:1)
at MixpanelMain. (mixpanel-main.js:88:1)
at Generator.next ()
at asyncGeneratorStep (asyncToGenerator.js:3:1)
at _next (asyncToGenerator.js:22:1)
I looked into the code and found out that you guys are extracting Constants from Platform
const {OS, Version, constants} = Platform;
const {Brand, Manufacturer, Model} = constants;
the thing is constants are undefined on web so when we are trying to get Brand from it its throwing an error,
A quick fix is initializing constants with an empty obj before initializing mix-panel like this ->
When I am initializing on web I get this error ->
-- TypeError: Cannot read properties of undefined (reading 'Brand') at MixpanelMain.getMetaData (mixpanel-main.js:44:1) at MixpanelMain. (mixpanel-main.js:88:1)
at Generator.next ()
at asyncGeneratorStep (asyncToGenerator.js:3:1)
at _next (asyncToGenerator.js:22:1)
Platform.constants = { Brand: '', Manufacturer: '', Model: '', };
but this needs to be fixed.