From 3175706086213cf4ee57c5adc5fc2b25fed790e1 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Feb 2017 13:22:24 +0900 Subject: [PATCH] [Client] Fix bug --- src/web/app/common/tags/url.tag | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/web/app/common/tags/url.tag b/src/web/app/common/tags/url.tag index 0ad9e72b5d..330acf8210 100644 --- a/src/web/app/common/tags/url.tag +++ b/src/web/app/common/tags/url.tag @@ -33,15 +33,14 @@ this.url = this.opts.href; this.on('before-mount', () => { - parser = document.createElement('a'); - parser.href = this.url; + const url = new URL(this.url); - this.schema = parser.protocol; - this.hostname = parser.hostname; - this.port = parser.port; - this.pathname = parser.pathname; - this.query = parser.search; - this.hash = parser.hash; + this.schema = url.protocol; + this.hostname = url.hostname; + this.port = url.port; + this.pathname = url.pathname; + this.query = url.search; + this.hash = url.hash; this.update(); });