Skip to content

Commit

Permalink
fix tricky timing bug with actions sent immediately at instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
tpresley committed May 3, 2024
1 parent 2456db9 commit 5fa35b2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class Component {

const action$ = ((runner instanceof Stream) ? runner : (runner.apply && runner(this.sources) || xs.never()))
const bootstrap$ = xs.of({ type: BOOTSTRAP_ACTION }).compose(delay(10))
const wrapped$ = this.model[BOOTSTRAP_ACTION] ? concat(bootstrap$, action$) : action$
const wrapped$ = this.model[BOOTSTRAP_ACTION] ? concat(bootstrap$, action$) : concat(xs.of({}).compose(delay(1)), action$)


let initialApiData
Expand Down Expand Up @@ -413,8 +413,6 @@ class Component {
}
}).map(sources => xs.merge(...sources)).flatten()

// childSources$.subscribe({ next: _ => _})

this.sources[CHILD_SOURCE_NAME] = {
select: (name) => {
const all$ = childSources$
Expand Down

0 comments on commit 5fa35b2

Please sign in to comment.