Skip to content

Cannot convert undefined or null to object #16

@RodriSanchez1

Description

@RodriSanchez1

Hi! Thanks @thyngster for your work. Im working on a React app that is wrapped with Cordova to build an Electron app. The project its Cboard and the Cordova Cboard if you want to check it out .
We want to set up analytics on the Electron app. I tested your library. On web is working perfecltly but on the Electron app im facing this issue:

image

I think the problem is in this line. The User Agent Data on Electron is:
NavigatorUAData : { "brands": [], "mobile": false, "platform": "" }

And
image

On the retrived object, doesnt have fullVersionList prop
One solution can be add a comprobation before (Object.values(d.fullVersionList) || ....) something like (d.fullVersionList && Object.values(d.fullVersionList) || ....)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions