Skip to content

Commit 3ccbede

Browse files
Data is being fetched from remote source every single time a chart is shown #255
1 parent ded3ab4 commit 3ccbede

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classes/Visualizer/Source/Csv/Remote.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private function _repopulate( $chart_id ) {
9797
* @return array The re populated array of data or old one.
9898
*/
9999
public function repopulateData( $data, $chart_id ) {
100-
return $this->_repopulate( $chart_id ) ? $this->_data : $data;
100+
return array_key_exists( 'data', $data ) ? $data['data'] : $data;
101101
}
102102

103103
/**
@@ -111,7 +111,7 @@ public function repopulateData( $data, $chart_id ) {
111111
* @return array The re populated array of series or old one.
112112
*/
113113
public function repopulateSeries( $series, $chart_id ) {
114-
return $this->_repopulate( $chart_id ) ? $this->_series : $series;
114+
return $series;
115115
}
116116

117117
/**

0 commit comments

Comments
 (0)