diff --git a/crates/js-component-bindgen/src/transpile_bindgen.rs b/crates/js-component-bindgen/src/transpile_bindgen.rs index 2e01fca9e..4ce493e38 100644 --- a/crates/js-component-bindgen/src/transpile_bindgen.rs +++ b/crates/js-component-bindgen/src/transpile_bindgen.rs @@ -316,7 +316,7 @@ impl<'a> JsBindgen<'a> { ({{ value, done }} = gen.next(value)); }} while (!(value instanceof Promise) && !done); if (done) {{ - if (resolve) resolve(value); + if (resolve) return resolve(value); else return value; }} if (!promise) promise = new Promise((_resolve, _reject) => (resolve = _resolve, reject = _reject));