Skip to content

Commit

Permalink
fix(bar-chart-native): crash with Mx10 (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad-Elsayed authored Jul 31, 2023
2 parents 5f6223f + 3cc8f21 commit b059dc0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/bar-chart-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- We fixed an issue when running with Mx10 crashes the app.

## [3.0.1] - 2023-5-17

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/bar-chart-native/src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="BarChart" version="3.0.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="BarChart" version="3.0.2" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="BarChart.xml" />
</widgetFiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ function extractDataPoints(series: BarSeriesType, dataSourceItems?: ObjectItem[]
const dataPointsExtraction: DataPointsExtraction = { dataPoints: [] };

for (const item of dataSourceItems) {
const x = (series.dataSet === "static" ? ensure(series.staticXAttribute) : ensure(series.dynamicXAttribute))(
item
);
const y = (series.dataSet === "static" ? ensure(series.staticYAttribute) : ensure(series.dynamicYAttribute))(
item
);
const x = (
series.dataSet === "static" ? ensure(series.staticXAttribute) : ensure(series.dynamicXAttribute)
).get(item);
const y = (
series.dataSet === "static" ? ensure(series.staticYAttribute) : ensure(series.dynamicYAttribute)
).get(item);

if (!x.value || !y.value) {
return null;
Expand Down

0 comments on commit b059dc0

Please sign in to comment.