]> 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>
Mon, 22 Jul 2013 18:02:18 +0000 (21:02 +0300)
core/js/share.js

index 4c8fd8741074ca183c2cc5dca9e596284eba794c..71e6136bf719533697cd9521cec1c734ed5b76e7 100644 (file)
@@ -122,7 +122,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'));
                        }
                });
        },