From 1cdcad7d47ba92043e18239a0fc934eeb89b5b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Thu, 8 Sep 2016 00:58:02 +0200 Subject: [PATCH] Fixed bug in templateHook directive. Fixed #2362. --- openslides/core/static/js/core/base.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index 6b46cfaa7..e85fe0dd8 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -277,9 +277,14 @@ angular.module('OpenSlidesApp.core', [ template: '', link: function (scope, iElement, iAttr) { var hooks = templateHooks.hooks[iAttr.hookName]; - var html = hooks.map(function (hook) { - return '
' + hook.template + '
'; - }).join(''); + var html; + if (hooks) { + html = hooks.map(function (hook) { + return '
' + hook.template + '
'; + }).join(''); + } else { + html = ''; + } iElement.append($compile(html)(scope)); } };