Skip to content

Commit bd935fe

Browse files
committed
Remove extra if statement.
1 parent 19131ab commit bd935fe

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/lib/dialog/dialog.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,12 @@ export class MdDialog {
6464
closeAll(): void {
6565
let i = this._openDialogs.length;
6666

67-
if (i > 0) {
68-
while (i--) {
69-
// The `_openDialogs` property isn't updated after close until the rxjs subscription
70-
// runs on the next microtask, in addition to modifying the array as we're going
71-
// through it. We loop through all of them and call close without assuming that
72-
// they'll be removed from the list instantaneously.
73-
this._openDialogs[i].close();
74-
}
67+
while (i--) {
68+
// The `_openDialogs` property isn't updated after close until the rxjs subscription
69+
// runs on the next microtask, in addition to modifying the array as we're going
70+
// through it. We loop through all of them and call close without assuming that
71+
// they'll be removed from the list instantaneously.
72+
this._openDialogs[i].close();
7573
}
7674
}
7775

0 commit comments

Comments
 (0)