From e6cef731ce177ef6445981aa6d467c8fbd135536 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 22 Jan 2021 06:55:53 +0100 Subject: Do not crash javascript on NextCloud 20 Part of: https://github.com/cweiske/grauphel/issues/84 --- js/loader.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/loader.js b/js/loader.js index 84c2342..8bff3b2 100644 --- a/js/loader.js +++ b/js/loader.js @@ -1,4 +1,6 @@ $(document).ready(function() { // translate search result type - OC.search.resultTypes.note = 'Note'; -}); \ No newline at end of file + if (OC.search !== undefined) { + OC.search.resultTypes.note = 'Note'; + } +}); -- cgit v1.2.3