Switched from object literal accessor definition to regular function, fixes #278
This commit is contained in:
parent
2a6f90e647
commit
34d303d576
@ -44,7 +44,7 @@
|
||||
|
||||
// Only re-created the chart if it has been initialized yet
|
||||
if(!this.initializeTimeoutId) {
|
||||
this.createChart(this.optionsProvider.currentOptions);
|
||||
this.createChart(this.optionsProvider.getCurrentOptions());
|
||||
}
|
||||
|
||||
// Return a reference to the chart object to chain up calls
|
||||
@ -117,7 +117,7 @@
|
||||
});
|
||||
|
||||
// Create the first chart
|
||||
this.createChart(this.optionsProvider.currentOptions);
|
||||
this.createChart(this.optionsProvider.getCurrentOptions());
|
||||
|
||||
// As chart is initialized from the event loop now we can reset our timeout reference
|
||||
// This is important if the chart gets initialized on the same element twice
|
||||
|
||||
@ -768,10 +768,10 @@ var Chartist = {
|
||||
updateCurrentOptions(true);
|
||||
|
||||
return {
|
||||
get currentOptions() {
|
||||
removeMediaQueryListeners: removeMediaQueryListeners,
|
||||
getCurrentOptions: function getCurrentOptions() {
|
||||
return Chartist.extend({}, currentOptions);
|
||||
},
|
||||
removeMediaQueryListeners: removeMediaQueryListeners
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user