Merge pull request #4159 from owncloud/Fixing-share-sj-error
Fixing share JS error
This commit is contained in:
commit
ab77af7b4d
|
@ -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 New Issue