From c7969ef418525f3c8cf01024656f463cb4a00baa Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 27 Mar 2022 02:22:31 +0900 Subject: [PATCH] refactor --- packages/client/src/components/global/url.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/client/src/components/global/url.vue b/packages/client/src/components/global/url.vue index 09513670d3..55f6c5d5f9 100644 --- a/packages/client/src/components/global/url.vue +++ b/packages/client/src/components/global/url.vue @@ -24,6 +24,14 @@ import { url as local } from '@/config'; import * as os from '@/os'; import { useTooltip } from '@/scripts/use-tooltip'; +function safeURIDecode(str: string) { + try { + return decodeURIComponent(str); + } catch { + return str; + } +} + export default defineComponent({ props: { url: { @@ -49,14 +57,6 @@ export default defineComponent({ }, {}, 'closed'); }); - function safeURIDecode(str: string) { - try { - return decodeURIComponent(str); - } catch { - return str; - } - } - return { local, schema: url.protocol,