Skip to content

Commit 7fbd09f

Browse files
committed
fix: Remove unnecessary setTimeout to prevent padding between callback
Signed-off-by: Akshat Patel <[email protected]>
1 parent d6009ab commit 7fbd09f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/dialog/dialog.directive.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,9 @@ export class DialogDirective implements OnInit, OnDestroy, OnChanges {
286286
* Helper method to close the dialogRef.
287287
*/
288288
close(meta: CloseMeta = { reason: CloseReasons.interaction }) {
289-
setTimeout(() => {
290-
if (this.dialogRef) {
291-
this.dialogRef.instance.doClose(meta);
292-
}
293-
});
289+
if (this.dialogRef) {
290+
this.dialogRef.instance.doClose(meta);
291+
}
294292
}
295293

296294
/**

0 commit comments

Comments
 (0)