Skip to content

Commit a8c842f

Browse files
authored
Merge pull request #2527 from Akshat55/dialog-performance-improvement
fix: Remove unnecessary setTimeout to prevent padding between callback
2 parents 8e00897 + cdf16c7 commit a8c842f

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)