diff --git a/.changeset/popular-bees-invent.md b/.changeset/popular-bees-invent.md new file mode 100644 index 000000000..47cf42798 --- /dev/null +++ b/.changeset/popular-bees-invent.md @@ -0,0 +1,5 @@ +--- +"@alauda/ui": patch +--- + +instanceof observable always fail diff --git a/src/dialog/confirm-dialog/confirm-dialog.component.ts b/src/dialog/confirm-dialog/confirm-dialog.component.ts index bba77a298..4e9dc5f49 100644 --- a/src/dialog/confirm-dialog/confirm-dialog.component.ts +++ b/src/dialog/confirm-dialog/confirm-dialog.component.ts @@ -10,7 +10,7 @@ import { Component, ViewEncapsulation, } from '@angular/core'; -import { firstValueFrom, Observable } from 'rxjs'; +import { firstValueFrom, isObservable } from 'rxjs'; import { ButtonComponent } from '../../button/button.component'; import { IconComponent } from '../../icon/icon.component'; @@ -113,7 +113,7 @@ export class ConfirmDialogComponent { const result = (beforeAction as CustomBeforeAction)(); - if (result instanceof Observable) { + if (isObservable(result)) { return firstValueFrom(result); }