Skip to content
This repository was archived by the owner on Nov 3, 2024. It is now read-only.

Commit 0875386

Browse files
fix(command): sequence error (#69)
1 parent 011d3fe commit 0875386

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<!-- ## [vNext](https://github.com/sktch7/ngx.command/compare/2.0.0...3.0.0) (2020-x-x) -->
22

3+
## [2.1.1](https://github.com/sketch7/ngx.command/compare/2.1.0...2.1.1) (2022-09-26)
4+
5+
### Bug Fixes
6+
7+
- **command:** execute throwing error due to `first` (empty sequence)
8+
39
## [2.1.0](https://github.com/sketch7/ngx.command/compare/2.0.0...2.1.0) (2022-07-12)
410

511
### Bug Fixes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ssv/ngx.command",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"versionSuffix": "",
55
"description": "Command pattern implementation for angular. Command used to encapsulate information which is needed to perform an action.",
66
"keywords": [

src/command.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import { Observable, combineLatest, Subscription, Subject, BehaviorSubject, of, EMPTY } from "rxjs";
3-
import { tap, map, filter, switchMap, catchError, finalize, first } from "rxjs/operators";
3+
import { tap, map, filter, switchMap, catchError, finalize, take } from "rxjs/operators";
44
import { ICommand } from "./command.model";
55

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

0 commit comments

Comments
 (0)