Commit 7d882e12 authored by michalkop93's avatar michalkop93

fixed error caused by function in config.data_order

parent b7b5e391
......@@ -1617,11 +1617,11 @@
};
c3_chart_internal_fn.isOrderDesc = function () {
var config = this.config;
return config.data_order && config.data_order.toLowerCase() === 'desc';
return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'desc';
};
c3_chart_internal_fn.isOrderAsc = function () {
var config = this.config;
return config.data_order && config.data_order.toLowerCase() === 'asc';
return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'asc';
};
c3_chart_internal_fn.orderTargets = function (targets) {
var $$ = this, config = $$.config, orderAsc = $$.isOrderAsc(), orderDesc = $$.isOrderDesc();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -206,11 +206,11 @@ c3_chart_internal_fn.hasPositiveValueInTargets = function (targets) {
};
c3_chart_internal_fn.isOrderDesc = function () {
var config = this.config;
return config.data_order && config.data_order.toLowerCase() === 'desc';
return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'desc';
};
c3_chart_internal_fn.isOrderAsc = function () {
var config = this.config;
return config.data_order && config.data_order.toLowerCase() === 'asc';
return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'asc';
};
c3_chart_internal_fn.orderTargets = function (targets) {
var $$ = this, config = $$.config, orderAsc = $$.isOrderAsc(), orderDesc = $$.isOrderDesc();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment