Show generic error when there is no error
This commit is contained in:
parent
57d178274d
commit
5160ea6063
|
@ -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'));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue