mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #4159 from owncloud/Fixing-share-sj-error
Fixing share JS error
This commit is contained in:
commit
ab77af7b4d
1 changed files with 7 additions and 1 deletions
|
|
@ -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'));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue