]> source.dussan.org Git - nextcloud-server.git/commitdiff
Show generic error when there is no error
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>
Mon, 22 Jul 2013 18:02:18 +0000 (21:02 +0300)
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>
Wed, 24 Jul 2013 18:48:23 +0000 (21:48 +0300)
core/js/share.js

index aec869dabc546fd8d5679918ed6faaafff6b465f..1fa76e62698afecece680d7c73463476a269e29b 100644 (file)
@@ -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'));
                        }
                });
        },