From ed2393c970557d1184ddb19519102be5a1f51a9d Mon Sep 17 00:00:00 2001 From: Hannah Ward Date: Tue, 25 Dec 2018 01:32:20 +0000 Subject: [PATCH] fix inconsistencies within who_to_follow_panel --- .../who_to_follow_panel/who_to_follow_panel.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.js b/src/components/who_to_follow_panel/who_to_follow_panel.js index 3ead0b72..b2183e6d 100644 --- a/src/components/who_to_follow_panel/who_to_follow_panel.js +++ b/src/components/who_to_follow_panel/who_to_follow_panel.js @@ -24,8 +24,8 @@ function showWhoToFollow (panel, reply) { function getWhoToFollow (panel) { var credentials = panel.$store.state.users.currentUser.credentials if (credentials) { - panel.usersToFollow.forEach((_, index) => { - panel.usersToFollow[index].name = 'Loading...' + panel.usersToFollow.forEach(toFollow => { + toFollow.name = 'Loading...' }) apiService.suggestions({credentials: credentials}) .then((reply) => { @@ -49,11 +49,11 @@ const WhoToFollowPanel = { return this.$store.state.users.currentUser.screen_name }, moreUrl: function () { - let host = window.location.hostname - let user = this.user - let suggestionsWeb = this.$store.state.instance.suggestionsWeb - let url = suggestionsWeb.replace(/{{host}}/g, encodeURIComponent(host)) - .replace(/{{user}}/g, encodeURIComponent(user)) + const host = window.location.hostname + const user = this.user + const suggestionsWeb = this.$store.state.instance.suggestionsWeb + const url = suggestionsWeb.replace(/{{host}}/g, encodeURIComponent(host)) + .replace(/{{user}}/g, encodeURIComponent(user)) return url }, suggestionsEnabled () {