Show generic error when there is no error

This commit is contained in:
Victor Dubiniuk 2013-07-22 21:02:18 +03:00
parent 57d178274d
commit 5160ea6063
1 changed files with 6 additions and 1 deletions

View 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'));
}
});
},