summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tests/integration/run_tests.rs1
-rw-r--r--cli/tests/testdata/071_location_unset.ts.out2
-rw-r--r--ext/web/12_location.js10
3 files changed, 3 insertions, 10 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index dd4482423..b6929b58a 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -233,7 +233,6 @@ itest!(_070_location {
itest!(_071_location_unset {
args: "run 071_location_unset.ts",
output: "071_location_unset.ts.out",
- exit_code: 1,
});
itest!(_072_location_relative_fetch {
diff --git a/cli/tests/testdata/071_location_unset.ts.out b/cli/tests/testdata/071_location_unset.ts.out
index 43308f3bd..f786d7a64 100644
--- a/cli/tests/testdata/071_location_unset.ts.out
+++ b/cli/tests/testdata/071_location_unset.ts.out
@@ -1,4 +1,4 @@
[WILDCARD][Function: Location]
Location {}
-error: Uncaught ReferenceError: Access to "location", run again with --location <href>.
+undefined
[WILDCARD]
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() {