Skip to content

Commit 46158cc

Browse files
committed
Remove extra if statement.
1 parent 3e7423d commit 46158cc

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
@@ -85,14 +85,12 @@ export class MdDialog {
8585
closeAll(): void {
8686
let i = this._openDialogs.length;
8787

88-
if (i > 0) {
89-
while (i--) {
90-
// The `_openDialogs` property isn't updated after close until the rxjs subscription
91-
// runs on the next microtask, in addition to modifying the array as we're going
92-
// through it. We loop through all of them and call close without assuming that
93-
// they'll be removed from the list instantaneously.
94-
this._openDialogs[i].close();
95-
}
88+
while (i--) {
89+
// The `_openDialogs` property isn't updated after close until the rxjs subscription
90+
// runs on the next microtask, in addition to modifying the array as we're going
91+
// through it. We loop through all of them and call close without assuming that
92+
// they'll be removed from the list instantaneously.
93+
this._openDialogs[i].close();
9694
}
9795
}
9896

0 commit comments

Comments
 (0)