Skip to content

Commit 84617aa

Browse files
Merge pull request #1019 from Codeinwp/bugfix/pro/381
Fixed console error when importing charts from others
2 parents f7fb53c + d7e1f56 commit 84617aa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

classes/Visualizer/Gutenberg/build/block.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

classes/Visualizer/Gutenberg/src/Components/Import/ChartImport.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ class ChartImport extends Component {
3434

3535
charts = charts.map( ( i, index ) => {
3636
let label = i['chart_data']['visualizer-settings'].title ? i['chart_data']['visualizer-settings'].title : `#${i.id}`;
37-
37+
if ( 'object' === typeof label ) {
38+
label = `#${i.id}`;
39+
}
3840
if ( 0 === index ) {
3941
id = i.id;
4042
}

0 commit comments

Comments
 (0)