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