Skip to content

Commit

Permalink
fix(command): sequence error (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlautier authored Sep 26, 2022
1 parent 011d3fe commit 0875386
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<!-- ## [vNext](https://github.com/sktch7/ngx.command/compare/2.0.0...3.0.0) (2020-x-x) -->

## [2.1.1](https://github.com/sketch7/ngx.command/compare/2.1.0...2.1.1) (2022-09-26)

### Bug Fixes

- **command:** execute throwing error due to `first` (empty sequence)

## [2.1.0](https://github.com/sketch7/ngx.command/compare/2.0.0...2.1.0) (2022-07-12)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ssv/ngx.command",
"version": "2.1.0",
"version": "2.1.1",
"versionSuffix": "",
"description": "Command pattern implementation for angular. Command used to encapsulate information which is needed to perform an action.",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/command.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Observable, combineLatest, Subscription, Subject, BehaviorSubject, of, EMPTY } from "rxjs";
import { tap, map, filter, switchMap, catchError, finalize, first } from "rxjs/operators";
import { tap, map, filter, switchMap, catchError, finalize, take } from "rxjs/operators";
import { ICommand } from "./command.model";

/**
Expand Down Expand Up @@ -136,7 +136,7 @@ export class Command implements ICommand {
// console.log("[command::executionPipe$] finalize inner#1 - set idle");
this._isExecuting$.next(false);
}),
first(),
take(1),
catchError(error => {
console.error("Unhandled execute error", error);
return EMPTY;
Expand Down

0 comments on commit 0875386

Please sign in to comment.