From 75e0955a29bc166c94262b75ebf0d201a55b5447 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Fri, 6 Apr 2018 14:24:52 +0200 Subject: [PATCH] Fixed motion slide not showing any diffs --- .../motions/static/js/motions/projector.js | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/openslides/motions/static/js/motions/projector.js b/openslides/motions/static/js/motions/projector.js index 5aca64bf0..6a0eca315 100644 --- a/openslides/motions/static/js/motions/projector.js +++ b/openslides/motions/static/js/motions/projector.js @@ -36,16 +36,18 @@ angular.module('OpenSlidesApp.motions.projector', [ }, function () { $scope.change_recommendations = []; $scope.title_change_recommendation = null; - MotionChangeRecommendation.filter({ - 'where': {'motion_version_id': {'==': id}} - }).forEach(function(change) { - if (change.isTextRecommendation()) { - $scope.change_recommendations.push(change); - } - if (change.isTitleRecommendation()) { - $scope.title_change_recommendation = change; - } - }); + if ($scope.motion) { + MotionChangeRecommendation.filter({ + 'where': {'motion_version_id': {'==': $scope.motion.active_version}} + }).forEach(function(change) { + if (change.isTextRecommendation()) { + $scope.change_recommendations.push(change); + } + if (change.isTitleRecommendation()) { + $scope.title_change_recommendation = change; + } + }); + } }); } ]);