From 23a7ea9c8548d46f16862fde6d9e96a215a9e01a Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Wed, 30 Sep 2020 18:51:19 +1000 Subject: fix: bundle loader returns exported value (#7764) Fixes: #7761 --- cli/system_loader.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cli/system_loader.js') diff --git a/cli/system_loader.js b/cli/system_loader.js index c96b2c7f6..8c083fccc 100644 --- a/cli/system_loader.js +++ b/cli/system_loader.js @@ -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; }; } -- cgit v1.2.3