Skip to content

Commit

Permalink
Merge pull request #8 from bouvet-apps/bugfix/BOUENO-94
Browse files Browse the repository at this point in the history
bugfix/BOUENO-94: add check if no data was found
  • Loading branch information
aleksandragrodem authored Jan 24, 2024
2 parents 8b388b3 + de9d875 commit 7cc6e96
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/resources/admin/widgets/matomo/matomo.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ exports.get = function (req) {
},
};

if (!model.pageData.yesterday && !model.pageData.lastWeek && !model.pageData.lastMonth) {
return {
contentType: "text/html",
body: "<widget class='error'>No data found</widget>"
};
}

return {
body: libs.thymeleaf.render(view, model),
contentType: 'text/html'
Expand Down

0 comments on commit 7cc6e96

Please sign in to comment.