From 7c31d0405522ffd81f13b3da66ba20ab2bd776b0 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sat, 6 Feb 2021 19:58:43 +1300 Subject: [PATCH] Strip slashes when loading instances --- background/instances.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background/instances.js b/background/instances.js index e27dd6a..4682b85 100644 --- a/background/instances.js +++ b/background/instances.js @@ -4,7 +4,7 @@ let globalList = [] function execute() { return request("https://api.invidious.io/instances.json?sort_by=health").then(res => res.json()).then(list => { - list = list.filter(i => i[1].type === "https").map(i => i[1].uri) + list = list.filter(i => i[1].type === "https").map(i => i[1].uri.replace(/\/+$/, "")) globalList = list }).catch(error => { console.error(error)