Skip to content

Conversation

@sweetleon
Copy link

TODO: implement a fix

TODO: implement a fix
@sweetleon sweetleon changed the title WIP: failing test proving that inputs can't be impty WIP: failing test proving that inputs can't be empty Jan 3, 2020
src/rxreact.tsx Outdated
super(props);
let viewModel = viewModelFactory(this.propsObservable);
this.observableState = combineObservables(viewModel.inputs);
this.observableState = Object.keys(viewModel.inputs).length ? combineObservables(viewModel.inputs) : new Observable();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need an observable that emits something.

I recommend using the of constructor -- you'll need to add it to the rxjs import above

Suggested change
this.observableState = Object.keys(viewModel.inputs).length ? combineObservables(viewModel.inputs) : new Observable();
this.observableState = Object.keys(viewModel.inputs).length ? combineObservables(viewModel.inputs) : of({});

@coveralls
Copy link

Pull Request Test Coverage Report for Build 884

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 26: 0.0%
Covered Lines: 35
Relevant Lines: 35

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants