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

fix(command): sequence error #69

Merged
merged 1 commit into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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