From c2606a2555bd08dab9fa112db9b645adc6a3d481 Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 11 Jun 2016 17:41:50 +0200 Subject: [PATCH] client/posts: fix handling sidebar errors --- client/js/controls/post_readonly_sidebar_control.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/js/controls/post_readonly_sidebar_control.js b/client/js/controls/post_readonly_sidebar_control.js index fafa12b..f8d523b 100644 --- a/client/js/controls/post_readonly_sidebar_control.js +++ b/client/js/controls/post_readonly_sidebar_control.js @@ -137,9 +137,7 @@ class PostReadonlySidebarControl { requestPromise() .then( response => { return api.get('/post/' + this._post.id) }, - response => { - return Promise.reject(response.description); - }) + response => { return Promise.reject(response); }) .then( response => { this._post = response; @@ -147,7 +145,7 @@ class PostReadonlySidebarControl { }, response => { reject(); - events.notify(events.Error, errorMessage); + window.alert(response.description); }); }); }