Fix missing unsubscribe return on subscribeCollect

This commit is contained in:
Fabian Stamm 2021-01-26 01:52:14 +01:00
parent cb060c6399
commit c29837d850
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@hibas123/utils",
"version": "2.2.17",
"version": "2.2.18",
"description": "Different Utilities, that are not worth own packages",
"main": "lib/index.js",
"types": "lib/index.d.ts",

View File

@ -62,6 +62,8 @@ export default class Observable<T = any> {
let oldcb = this.subscriberCollect.find((e) => e === callback);
if (!oldcb) this.subscriberCollect.push(callback);
return () => this.unsubscribe(callback);
}
/**