diff --git a/lib/app/scoring.js b/lib/app/scoring.js index 30e1f4a956..7cc646b3c8 100644 --- a/lib/app/scoring.js +++ b/lib/app/scoring.js @@ -19,6 +19,9 @@ setModel = function(m) { setupNotifications = function() { var statsNotification; + if (typeof jQuery === "undefined" || jQuery === null) { + return; + } statsNotification = function(html, type) { if (user.get('stats.lvl') === 0) { return; diff --git a/src/app/scoring.coffee b/src/app/scoring.coffee index 33a25020af..d91c08130c 100644 --- a/src/app/scoring.coffee +++ b/src/app/scoring.coffee @@ -11,6 +11,8 @@ setModel = (m) -> setupNotifications() setupNotifications = -> + return unless jQuery? # Only run this in the browser + statsNotification = (html, type) -> #don't show notifications if user dead return if user.get('stats.lvl') == 0