-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(nav-bar): null check tabs when finding tab #11964
fix(nav-bar): null check tabs when finding tab #11964
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this issue report and contribution!
Can you please update the JSDoc and sign the CLA?
- `MdNavBarController._getTabs()` returns an empty array instead of `null` to match existing return type - rename `MdNavItemController._focused` to `MdNavItemController.isFocused` - make it non-private since it is accessed by `MdNavBarController.onFocus()` - fix/improve types - remove unused variables - add JSDoc Relates to #11964
- `MdNavBarController._getTabs()` returns an empty array instead of `null` to match existing return type - rename `MdNavItemController._focused` to `MdNavItemController.isFocused` - make it non-private since it is accessed by `MdNavBarController.onFocus()` - fix/improve types - remove unused variables - add JSDoc Relates to #11964
@googlebot I signed it! |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@Splaktar required changes uploaded. Thanks for the review. |
- `MdNavBarController._getTabs()` returns an empty array instead of `null` to match existing return type - rename `MdNavItemController._focused` to `MdNavItemController.isFocused` - make it non-private since it is accessed by `MdNavBarController.onFocus()` - fix/improve types - remove unused variables - add JSDoc Relates to #11964
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
CI is broken due to NPM being down atm. |
PR Checklist
Please check that your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently on browser window resize there is a possibility that tabs will not be found on time. This will be ended wit console error
Cannot read property 'length' of null
Issue Number:
What is the new behavior?
No error
Does this PR introduce a breaking change?
Other information