From ae0a496da83613dc8b41540f2fa32479a3ec3f07 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 10 Nov 2020 09:50:46 +0100 Subject: Bump jquery from 2.2.4 to 3.1.0 Signed-off-by: Christoph Wurst --- core/src/OC/l10n.js | 2 +- core/src/jquery/contactsmenu.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'core/src') diff --git a/core/src/OC/l10n.js b/core/src/OC/l10n.js index 22bb94e4e1b..2eeb342aa13 100644 --- a/core/src/OC/l10n.js +++ b/core/src/OC/l10n.js @@ -328,7 +328,7 @@ export default L10n * * @returns {String} locale string */ -export const getLocale = () => $('html').data('locale') +export const getLocale = () => $('html').data('locale') ?? 'en' /** * Returns the user's language diff --git a/core/src/jquery/contactsmenu.js b/core/src/jquery/contactsmenu.js index 50d256ff3f8..447f5adb62a 100644 --- a/core/src/jquery/contactsmenu.js +++ b/core/src/jquery/contactsmenu.js @@ -82,9 +82,10 @@ $.fn.contactsMenu = function(shareWith, shareType, appendTo) { } actions.forEach(function(action) { - const template = entryTemplate - $list.find('ul').append(template(action)) + $list.find('ul').append(entryTemplate(action)) }) + + $div.trigger('load') }, function(jqXHR) { $list.find('ul').find('li').addClass('hidden') @@ -95,11 +96,12 @@ $.fn.contactsMenu = function(shareWith, shareType, appendTo) { title = t('core', 'Error fetching contact actions') } - const template = entryTemplate - $list.find('ul').append(template({ + $list.find('ul').append(entryTemplate({ hyperlink: '#', title, })) + + $div.trigger('loaderror', jqXHR) }) }) -- cgit v1.2.3