We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2a63d5 commit d27f639Copy full SHA for d27f639
src/Location.js
@@ -1,6 +1,15 @@
1
const {EventEmitter} = require('events');
2
const url = require('url');
3
-const utils = require('./utils');
+
4
+const {
5
+ workerData: {
6
+ args: {
7
+ options: {
8
+ baseUrl,
9
+ },
10
11
12
+} = require('worker_threads');
13
14
class Location extends EventEmitter {
15
constructor(u) {
@@ -12,7 +21,7 @@ class Location extends EventEmitter {
21
get href() { return this._url.href || ''; }
22
set href(href) {
23
const oldUrl = this._url;
- const newUrl = new url.URL(href, utils._getBaseUrl(this._url.href));
24
+ const newUrl = new url.URL(href, baseUrl);
16
25
this._url = newUrl;
17
26
if (
18
27
newUrl.origin !== oldUrl.origin ||
0 commit comments