summaryrefslogtreecommitdiff
path: root/ext/web/12_location.js
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2021-12-14 00:35:59 +0900
committerGitHub <noreply@github.com>2021-12-14 00:35:59 +0900
commit308813ae29763512a8be1044b31b8d5dad36c38c (patch)
tree1837d0d97b8320afddbbad5bf1e29ae4a26bbdf5 /ext/web/12_location.js
parenta2b4d1354077b676459142eb399df9d5a70c0c5f (diff)
fix(ext/web): set location undefined when `--location` is not specified (#13046)
Diffstat (limited to 'ext/web/12_location.js')
-rw-r--r--ext/web/12_location.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/web/12_location.js b/ext/web/12_location.js
index 40dd545fe..36b70b4e6 100644
--- a/ext/web/12_location.js
+++ b/ext/web/12_location.js
@@ -9,7 +9,6 @@
const {
Error,
ObjectDefineProperties,
- ReferenceError,
Symbol,
SymbolFor,
SymbolToStringTag,
@@ -356,8 +355,8 @@
},
});
- let location = null;
- let workerLocation = null;
+ let location = undefined;
+ let workerLocation = undefined;
function setLocationHref(href) {
location = new Location(href, locationConstructorKey);
@@ -377,11 +376,6 @@
},
locationDescriptor: {
get() {
- if (location == null) {
- throw new ReferenceError(
- `Access to "location", run again with --location <href>.`,
- );
- }
return location;
},
set() {