Skip to content

Commit b58aa74

Browse files
committed
simplify timeout
1 parent e4504da commit b58aa74

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/content-switcher/content-switcher.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ export class ContentSwitcher implements AfterViewInit {
5454
const firstActive = this.options.find(option => option.active);
5555
// delay setting active until the DOM has settled
5656
if (!firstActive) {
57-
setTimeout(() => {
58-
this.options.first.active = true;
59-
});
57+
setTimeout(() => this.options.first.active = true);
6058
}
6159
// subscribe to each item, emit when one is selected, and reset the active states
6260
this.options.forEach(option => {

0 commit comments

Comments
 (0)