Skip to content

Commit

Permalink
Fixed news and statistics widgets not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ignacionelson committed Jan 7, 2022
1 parent afc564d commit e598e23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/src/js/parts/widget_news.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
url: json_strings.uri.widgets+'ajax/news.php',
cache: false,
}).done(function(data) {
var obj = JSON.parse(data);
console.log(obj);
// var obj = JSON.parse(data);
var obj = data;
$.each(obj.items, function(i, item) {
var li = $('<li/>')
.appendTo(list)
Expand Down
3 changes: 2 additions & 1 deletion assets/src/js/parts/widget_statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
data: { days:days },
cache: false,
}).done(function(data) {
var obj = JSON.parse(data);
// var obj = JSON.parse(data);
var obj = data;
_chart_container.append('<canvas id="chart_statistics"><canvas>');
chart = new Chart(document.getElementById('chart_statistics'), {
type: 'line',
Expand Down

0 comments on commit e598e23

Please sign in to comment.