From 66c72f4345fe15e07a0d7547aecd36726de3493d Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Wed, 13 Jun 2018 13:00:17 +0200 Subject: [PATCH] Fixed remarks (closes #3760) --- openslides/core/static/js/core/base.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index 6b620ca6e..60acb14fa 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -1348,15 +1348,13 @@ angular.module('OpenSlidesApp.core', [ Projector.inject(projectorsChanged); - return $q(function (resolve, reject) { - $http.post('/rest/core/projector/project/', data).then(function (success) { - resolve(success); - }, function (error) { - // revert the changed made earlier + return $http.post('/rest/core/projector/project/', data).catch( + function (error) { + // revert the changes made earlier Projector.inject(originalProjectors); - reject(error); - }); - }); + return $q.reject(error); + } + ); }, }; }