From 0036567f7d552753ad62a263eb82b36f98e81ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Thu, 23 Aug 2018 15:39:15 +0200 Subject: [PATCH] Fixed TypeError in Motion and Assignment Slides (Fixed#3813) in MotionPollDecimalPlaces and AssignmentPollDecimalPlaces --- openslides/assignments/static/js/assignments/base.js | 10 ++++++++-- openslides/motions/static/js/motions/base.js | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/openslides/assignments/static/js/assignments/base.js b/openslides/assignments/static/js/assignments/base.js index c971c99a2..08f481809 100644 --- a/openslides/assignments/static/js/assignments/base.js +++ b/openslides/assignments/static/js/assignments/base.js @@ -324,10 +324,16 @@ angular.module('OpenSlidesApp.assignments', []) .provider('AssignmentPollDecimalPlaces', [ function () { - this.$get = [function () { + this.$get = ['$q', function ($q) { return { getPlaces: function (poll, find) { - return 0; + if (find) { + return $q(function (resolve) { + resolve(0); + }); + } else { + return 0; + } }, }; }]; diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js index e524a30fe..8b9d4e8d9 100644 --- a/openslides/motions/static/js/motions/base.js +++ b/openslides/motions/static/js/motions/base.js @@ -206,10 +206,16 @@ angular.module('OpenSlidesApp.motions', [ .provider('MotionPollDecimalPlaces', [ function () { - this.$get = [function () { + this.$get = ['$q', function ($q) { return { getPlaces: function (poll, find) { - return 0; + if (find) { + return $q(function (resolve) { + resolve(0); + }); + } else { + return 0; + } }, }; }];