Merge pull request #4159 from owncloud/Fixing-share-sj-error

Fixing share JS error
This commit is contained in:
Jörn Friedrich Dreyer 2013-07-23 08:23:15 -07:00
commit ab77af7b4d
1 changed files with 7 additions and 1 deletions

View File

@ -92,6 +92,7 @@ OC.Share={
}
}
if (shares) {
OC.Share.statuses[itemSource] = OC.Share.statuses[itemSource] || {};
OC.Share.statuses[itemSource]['link'] = link;
} else {
delete OC.Share.statuses[itemSource];
@ -122,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'));
}
});
},