diff --git a/wire/fiber/fiber.ts b/wire/fiber/fiber.ts index cadf9283546..6e59ff9299f 100644 --- a/wire/fiber/fiber.ts +++ b/wire/fiber/fiber.ts @@ -265,7 +265,17 @@ namespace $ { if( ! $mol_promise_like( this.cache ) ) return this.cache - await this.cache + await Promise.race([ + this.cache, + new Promise( done => { + const sub = new $mol_wire_pub_sub + const prev = sub.track_on() + sub.track_next( this ) + sub.track_off( prev ) + sub.absorb = done + } ) + ]) + if( ! $mol_promise_like( this.cache ) ) return this.cache if( this.cursor === $mol_wire_cursor.final ) { // never ends on destructed fiber