mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(ext/web): set location undefined when --location
is not specified (#13046)
This commit is contained in:
parent
a2b4d13540
commit
308813ae29
3 changed files with 3 additions and 10 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue