fix: name.replace exception

This commit is contained in:
Shivam Mishra 2020-12-22 12:21:40 +05:30
parent ecfc069cbd
commit a22db61492
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "frappe-charts",
"version": "1.5.5",
"version": "1.5.6",
"description": "https://frappe.github.io/charts",
"main": "dist/frappe-charts.min.cjs.js",
"module": "dist/frappe-charts.min.esm.js",

View File

@ -110,7 +110,7 @@ export default class AxisChart extends BaseChart {
let values = d.values;
let cumulativeYs = d.cumulativeYs || [];
return {
name: d.name.replace(/<|>|&/g, (char) => char == '&' ? '&amp;' : char == '<' ? '&lt;' : '&gt;'),
name: d.name && d.name.replace(/<|>|&/g, (char) => char == '&' ? '&amp;' : char == '<' ? '&lt;' : '&gt;'),
index: i,
chartType: d.chartType,

View File

@ -3,7 +3,7 @@ import * as Charts from './chart';
let frappe = { };
frappe.NAME = 'Frappe Charts';
frappe.VERSION = '1.5.5';
frappe.VERSION = '1.5.6';
frappe = Object.assign({ }, frappe, Charts);