This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Commit 33652b4
perf(tabs): remove unreferenced elements variable from TabsController (#11379)
<!--
Filling out this template is required! Do not delete it when submitting a Pull Request! Without this information, your Pull Request may be auto-closed.
-->
## PR Checklist
Please check that your PR fulfills the following requirements:
- [x] The commit message follows [our guidelines](https://github.com/angular/material/blob/master/.github/CONTRIBUTING.md#-commit-message-format)
- [x] Tests for the changes have been added or this is not a bug fix / enhancement
- [x] Docs have been added, updated, or were not required
## PR Type
What kind of change does this PR introduce?
<!-- Please check the one that applies to this PR using "x". -->
```
[ ] Bugfix
[ ] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:
```
## What is the current behavior?
The `MdTabsController` initializes `var elements = getElements()` at the top of the controller and again in `setupTabsController ()` but that `elements` variable is no longer referenced as all of the code has been updated to call `getElements()` each time instead.
<!-- Please describe the current behavior that you are modifying and link to one or more relevant issues. -->
Issue Number:
Fixes #11377
## What is the new behavior?
Remove this unused and unreferenced variable to avoid extra DOM lookups.
## Does this PR introduce a breaking change?
```
[ ] Yes
[x] No
```
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
<!-- Note that breaking changes are highly unlikely to get merged to master unless the validation is clear and the use case is critical. -->
## Other information1 parent d48c5b8 commit 33652b4
1 file changed
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| |||
94 | 92 | | |
95 | 93 | | |
96 | 94 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 95 | | |
102 | 96 | | |
103 | 97 | | |
| |||
469 | 463 | | |
470 | 464 | | |
471 | 465 | | |
472 | | - | |
| 466 | + | |
473 | 467 | | |
474 | 468 | | |
475 | 469 | | |
| |||
716 | 710 | | |
717 | 711 | | |
718 | 712 | | |
719 | | - | |
| 713 | + | |
720 | 714 | | |
721 | 715 | | |
722 | 716 | | |
| |||
926 | 920 | | |
927 | 921 | | |
928 | 922 | | |
929 | | - | |
| 923 | + | |
930 | 924 | | |
931 | 925 | | |
0 commit comments