From 2f404b16b73123a91f1a55be79caecc8fa5db795 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 16 Feb 2018 12:23:02 +0100 Subject: [PATCH] MOBILE-2361 quiz: Fix errors when state is undefined --- www/core/components/question/services/question.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/core/components/question/services/question.js b/www/core/components/question/services/question.js index fd216f5f9ec..6ed971d4993 100644 --- a/www/core/components/question/services/question.js +++ b/www/core/components/question/services/question.js @@ -413,7 +413,7 @@ angular.module('mm.core.question') * @return {Object} State. */ self.getState = function(name) { - return states[name]; + return states[name || 'unknown']; }; /**