[Client] Fix bug
This commit is contained in:
parent
d2182c1705
commit
3175706086
|
@ -33,15 +33,14 @@
|
||||||
this.url = this.opts.href;
|
this.url = this.opts.href;
|
||||||
|
|
||||||
this.on('before-mount', () => {
|
this.on('before-mount', () => {
|
||||||
parser = document.createElement('a');
|
const url = new URL(this.url);
|
||||||
parser.href = this.url;
|
|
||||||
|
|
||||||
this.schema = parser.protocol;
|
this.schema = url.protocol;
|
||||||
this.hostname = parser.hostname;
|
this.hostname = url.hostname;
|
||||||
this.port = parser.port;
|
this.port = url.port;
|
||||||
this.pathname = parser.pathname;
|
this.pathname = url.pathname;
|
||||||
this.query = parser.search;
|
this.query = url.search;
|
||||||
this.hash = parser.hash;
|
this.hash = url.hash;
|
||||||
|
|
||||||
this.update();
|
this.update();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue