From e984b86464e9f78272a4db7dc82234019b625174 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20G=C3=A4rtner?= <andreas.gaertner@mni.thm.de>
Date: Wed, 5 Oct 2016 14:17:17 +0200
Subject: [PATCH] Fix javascript errors when changing roles in some use cases

---
 .../app/view/feedbackQuestions/QuestionsMessagePanel.js      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main/webapp/app/view/feedbackQuestions/QuestionsMessagePanel.js b/src/main/webapp/app/view/feedbackQuestions/QuestionsMessagePanel.js
index 880ee7196..3ed9024a3 100644
--- a/src/main/webapp/app/view/feedbackQuestions/QuestionsMessagePanel.js
+++ b/src/main/webapp/app/view/feedbackQuestions/QuestionsMessagePanel.js
@@ -74,7 +74,10 @@ Ext.define('ARSnova.view.feedbackQuestions.QuestionsMessagePanel', {
 		updateClockTask: {
 			name: 'renew the actual time at the titlebar',
 			run: function () {
-				ARSnova.app.mainTabPanel.tabPanel.feedbackQuestionsPanel.questionsPanel.updateTime();
+				var fQP = ARSnova.app.mainTabPanel.tabPanel.feedbackQuestionsPanel;
+				if (typeof fQP.questionsPanel.updateTime === 'function') {
+					fQP.questionsPanel.updateTime();
+				}
 			},
 			interval: 1000 // 1 second
 		}
-- 
GitLab