Do not show share button if OC.Share is undefined

pull/1/head
Victor Dubiniuk 10 years ago
parent 73ab392a5a
commit 0d69eaf98e

@ -220,7 +220,7 @@ var documentsMain = {
documentsMain.fileName = documentsMain.getNameByFileid(response.file_id);
documentsMain.UI.showEditor(
documentsMain.fileName || response.title,
response.permissions & OC.PERMISSION_SHARE && !documentsMain.isGuest
typeof OC.Share !== 'undefined' && response.permissions & OC.PERMISSION_SHARE && !documentsMain.isGuest
);
if (documentsMain.isGuest){
$('#odf-close').text(t('documents', 'Save') );

Loading…
Cancel
Save