Skip to content

Commit

Permalink
fix(column-chart-widget): crash with Mx10 (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaSimsic authored Aug 15, 2023
2 parents 452047a + caa52d7 commit e65fd32
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/column-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.

## [2.0.1] - 2023-5-17

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions packages/pluggableWidgets/column-chart-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "column-chart-native",
"widgetName": "ColumnChart",
"version": "2.0.1",
"version": "2.0.2",
"license": "Apache-2.0",
"copyright": "© Mendix Technology BV 2022. All rights reserved.",
"repository": {
Expand Down Expand Up @@ -32,4 +32,4 @@
"detox": "^19.7.1",
"eslint": "^7.20.0"
}
}
}
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="ColumnChart" version="2.0.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="ColumnChart" version="2.0.2" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="ColumnChart.xml" />
</widgetFiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ function extractDataPoints(series: ColumnSeriesType, dataSourceItems?: ObjectIte
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 e65fd32

Please sign in to comment.