From 719f9288b97bcd6c9de42d0eb682e11a38ab864b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?=
 <skjnldsv@protonmail.com>
Date: Fri, 24 Aug 2018 20:31:29 +0200
Subject: [PATCH] Tests fixes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
---
 apps/files_sharing/js/public_note.js | 11 +++++++----
 1 file 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
-- 
GitLab