Skip to content

Commit

Permalink
fix: dont emit undefined as binding config
Browse files Browse the repository at this point in the history
  • Loading branch information
floydnant committed Nov 25, 2023
1 parent 8fbb779 commit 03189b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<app-tt-editor
#descriptionTtEditor
[bind]="bindConfig$ | push : 'native'"
[bind]="bindConfig$ | push"
(isActive)="isActive$.next($event)"
(updateOnBlur)="updateInput$.next($event)"
(blur)="blurInput$.next($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export class TipTapEditorComponent<TContext = unknown> implements OnDestroy {
)

private bindConfig$ = new Subject<{ input$: Observable<string>; context: TContext }>()
@Input() set bind(bound: { input$: Observable<string>; context: TContext }) {
this.bindConfig$.next(bound)
@Input() set bind(bindConfig: { input$: Observable<string>; context: TContext } | undefined) {
if (bindConfig) this.bindConfig$.next(bindConfig)
}
private bound$ = this.bindConfig$.pipe(
untilDestroyed(this),
Expand Down

0 comments on commit 03189b9

Please sign in to comment.