From a4841eb8aa8744d8e9439a5b164848bb4b9bb831 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 9 Dec 2021 01:19:09 +0800 Subject: [PATCH] Fix #1016, .at() is not support in Safari --- src/pages/Settings.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 3378a0e91..58162f571 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -49,8 +49,9 @@ export default { computed: { currentPage() { - let pathEnd = useRoute().path.split("/").at(-1); - if (pathEnd == "settings" || pathEnd == null) { + let pathSplit = useRoute().path.split("/"); + let pathEnd = pathSplit[pathSplit.length - 1]; + if (!pathEnd || pathEnd === "settings") { return "general"; } return pathEnd;