1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

fix: bundle loader returns exported value (#7764)

Fixes: #7761
This commit is contained in:
Kitson Kelly 2020-09-30 18:51:19 +10:00 committed by GitHub
parent 7c62b7b043
commit 23a7ea9c85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -44,14 +44,15 @@ let System, __instantiate;
function gE(exp) {
return (id, v) => {
v = typeof id === "string" ? { [id]: v } : id;
for (const [id, value] of Object.entries(v)) {
const e = typeof id === "string" ? { [id]: v } : id;
for (const [id, value] of Object.entries(e)) {
Object.defineProperty(exp, id, {
value,
writable: true,
enumerable: true,
});
}
return v;
};
}

View file

@ -94,8 +94,8 @@ var System, __instantiate;
function gE(exp) {
return function (id, v) {
var _a;
v = typeof id === "string" ? ((_a = {}), (_a[id] = v), _a) : id;
for (var _i = 0, _b = Object.entries(v); _i < _b.length; _i++) {
var e = typeof id === "string" ? ((_a = {}), (_a[id] = v), _a) : id;
for (var _i = 0, _b = Object.entries(e); _i < _b.length; _i++) {
var _c = _b[_i],
id_1 = _c[0],
value = _c[1];
@ -105,6 +105,7 @@ var System, __instantiate;
enumerable: true,
});
}
return v;
};
}
function rF(main) {