Node.js based forum software built for the modern web
prevent crash if topic graph is clicked while not loaded
barisusakli6dd035a5af40
diff --git a/public/src/admin/general/dashboard.js b/public/src/admin/general/dashboard.jsindex 79b6343681..9165d53938 100644--- a/public/src/admin/general/dashboard.js+++ b/public/src/admin/general/dashboard.js@@ -293,7 +293,9 @@ define('admin/general/dashboard', ['semver'], function(semver) {graphs.topics = new Chart(topicsCtx).Doughnut([], {responsive: true});topicsCanvas.onclick = function(evt){var obj = graphs.topics.getSegmentsAtEvent(evt);- window.open(RELATIVE_PATH + '/topic/' + obj[0].tid);+ if (obj && obj[0]) {+ window.open(RELATIVE_PATH + '/topic/' + obj[0].tid);+ }};intervals.graphs = setInterval(updateTrafficGraph, 15000);