From: Victor Dubiniuk Date: Mon, 22 Jul 2013 18:02:18 +0000 (+0300) Subject: Show generic error when there is no error X-Git-Tag: v5.0.10~38 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7deebc926b30dbc49e4148495c3ce921a026a05c;p=nextcloud-server.git Show generic error when there is no error --- diff --git a/core/js/share.js b/core/js/share.js index aec869dabc5..1fa76e62698 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -123,7 +123,12 @@ OC.Share={ callback(result.data); } } else { - OC.dialogs.alert(result.data.message, t('core', 'Error while sharing')); + if (result.data && result.data.message) { + var msg = result.data.message; + } else { + var msg = t('core', 'Error'); + } + OC.dialogs.alert(msg, t('core', 'Error while sharing')); } }); },