From 37eec7d99b391e963b59416d5d4b800b1098d5d0 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Thu, 29 Jun 2017 07:44:25 +0200 Subject: [PATCH] Minor Bugfixes (fixes #3312, fixes #3313) --- openslides/motions/static/js/motions/base.js | 6 +++++- openslides/motions/static/js/motions/pdf.js | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js index 6fae15734..c372b1f75 100644 --- a/openslides/motions/static/js/motions/base.js +++ b/openslides/motions/static/js/motions/base.js @@ -613,7 +613,11 @@ angular.module('OpenSlidesApp.motions', [ }, isRelatedProjected: function () { // A motion related object is the list of speakers (through the agenda item) - return this.agenda_item.isListOfSpeakersProjected(); + if (this.agenda_item) { + return this.agenda_item.isListOfSpeakersProjected(); + } else { + return []; + } }, }, relations: { diff --git a/openslides/motions/static/js/motions/pdf.js b/openslides/motions/static/js/motions/pdf.js index 8d2871587..6ed1eb98d 100644 --- a/openslides/motions/static/js/motions/pdf.js +++ b/openslides/motions/static/js/motions/pdf.js @@ -375,11 +375,12 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf']) .factory('MotionPartialContentProvider', [ '$q', 'gettextCatalog', + 'Config', 'PDFLayout', 'PdfMakeConverter', 'ImageConverter', 'HTMLValidizer', - function ($q, gettextCatalog, PDFLayout, PdfMakeConverter, ImageConverter, HTMLValidizer) { + function ($q, gettextCatalog, Config, PDFLayout, PdfMakeConverter, ImageConverter, HTMLValidizer) { /* * content should be an array of content blocks. Each content is an object providing a * heading and a text. E.g.