victory
victory copied to clipboard
App crashes on victory-native iOS on specific versions. TypeError: undefined is not a function (near '...Object.fromEntries...')
I am getting this error at victory-chart for iOS version 11.4. On other versions it is working fine. The app crashes as soon as the screen is loaded with the chart and displays the following error.
TypeError: undefined is not a function (near '...Object.fromEntries...')
This error is located at:
in VictoryChart (created by VictoryChart)
.
.
.
I have updated to the latest version and tried re-installing the module but still no change observed.
hey @AliZaib-Emumba 👋🏻 please can you provide a reproduction / chart code sample for this?
it looks like this might be a bug in victory-core
as that's the only place we use Object.fromEntries()
i'm not sure whether that's supported or not in react-native
-- it may be that we just need an extra polyfill or to use core-js
or something
For me it is happening in Android. I just installed the library and then after running seeing this issue.
Happening for us in this setup:
- react-native 0.66.4
- victory 36.6.8
- iOS 12.1, iPhone 8
Using VictoryAxis, VictoryLabel, VictoryTooltip, VictoryBar, VictoryChart, VictoryContainer
Not happening on iOS 12.3, iPhone XS
Upd: ulso happening on iPhone 7 Plus, 5s, all with iOS 12.1.4
also happening in android
Update: Use this package for the fix
https://www.npmjs.com/package/polyfill-object.fromentries
This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.