summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/public_note.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/js/public_note.js')
-rw-r--r--apps/files_sharing/js/public_note.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files_sharing/js/public_note.js b/apps/files_sharing/js/public_note.js
index f8aa4cf5a60..a303d6c7675 100644
--- a/apps/files_sharing/js/public_note.js
+++ b/apps/files_sharing/js/public_note.js
@@ -21,8 +21,11 @@
*/
$(document).ready(function() {
- var noteHtml = document.getElementById('notemenu').outerHTML
- $(noteHtml).insertBefore('#header-primary-action');
- $('#notemenu').removeClass('hidden');
- OC.registerMenu($('#notemenu .menutoggle'), $('#notemenu .menu'))
+ var noteElmt = document.getElementById('notemenu')
+ if (noteElmt) {
+ var noteHtml = noteElmt.outerHTML
+ $(noteHtml).insertBefore('#header-primary-action');
+ $('#notemenu').removeClass('hidden');
+ OC.registerMenu($('#notemenu .menutoggle'), $('#notemenu .menu'))
+ }
}) \ No newline at end of file