From 7de48f36e617e2169185989349207eb2571aaa77 Mon Sep 17 00:00:00 2001 From: erosenthal Date: Thu, 20 Feb 2020 15:34:15 -0500 Subject: [PATCH 1/3] bring getConfig function in scope --- app/ui-sidenav/client/sidebarItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ui-sidenav/client/sidebarItem.js b/app/ui-sidenav/client/sidebarItem.js index 5e676fd66c93..84eb47835f01 100644 --- a/app/ui-sidenav/client/sidebarItem.js +++ b/app/ui-sidenav/client/sidebarItem.js @@ -75,7 +75,7 @@ function setLastMessageTs(instance, ts) { }, 60000); } -function getConfig(e) { +var getConfig = function(e) { const canLeave = () => { const roomData = Session.get(`roomData${ this.rid }`); @@ -221,7 +221,7 @@ Template.sidebarItem.events({ e.stopPropagation(); // to not close the menu e.preventDefault(); - const config = getConfig(e); + const config = getConfig.call(this, e); popover.open(config); }, }); From fc4f1fcc29c9105a402a7e3010d9ff4261419143 Mon Sep 17 00:00:00 2001 From: erosenthal Date: Thu, 20 Feb 2020 15:39:36 -0500 Subject: [PATCH 2/3] lint --- app/ui-share/client/share.js | 2 +- app/ui-sidenav/client/sidebarItem.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/ui-share/client/share.js b/app/ui-share/client/share.js index 0564a1399728..9a0b358277e2 100644 --- a/app/ui-share/client/share.js +++ b/app/ui-share/client/share.js @@ -1,6 +1,6 @@ import { Template } from 'meteor/templating'; -import { getShareData, isMobile } from '../../utils'; +import { getShareData } from '../../utils'; function getShareString() { const data = getShareData(); diff --git a/app/ui-sidenav/client/sidebarItem.js b/app/ui-sidenav/client/sidebarItem.js index 84eb47835f01..7c842221786c 100644 --- a/app/ui-sidenav/client/sidebarItem.js +++ b/app/ui-sidenav/client/sidebarItem.js @@ -75,7 +75,7 @@ function setLastMessageTs(instance, ts) { }, 60000); } -var getConfig = function(e) { +const getConfig = function(e) { const canLeave = () => { const roomData = Session.get(`roomData${ this.rid }`); @@ -158,7 +158,7 @@ var getConfig = function(e) { currentTarget: e.currentTarget, offsetHorizontal: -e.currentTarget.clientWidth, }; -} +}; Template.sidebarItem.onCreated(function() { this.user = Users.findOne(Meteor.userId(), { fields: { username: 1 } }); From 0a02b09b16b8cb04ce2bbba6556da83070fc9f44 Mon Sep 17 00:00:00 2001 From: erosenthal Date: Thu, 20 Feb 2020 15:46:19 -0500 Subject: [PATCH 3/3] missed a spot --- app/ui-sidenav/client/sidebarItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ui-sidenav/client/sidebarItem.js b/app/ui-sidenav/client/sidebarItem.js index 7c842221786c..43af52320c2e 100644 --- a/app/ui-sidenav/client/sidebarItem.js +++ b/app/ui-sidenav/client/sidebarItem.js @@ -205,7 +205,7 @@ Template.sidebarItem.events({ return; } - const config = getConfig(e); + const config = getConfig.call(this, e); const doLongTouch = () => { popover.open(config);