Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

fix(nav-bar): throws exception when indexing null tabs variable #11965

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

Splaktar
Copy link
Member

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number:
Relates to #11964

What is the new behavior?

  • 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

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

The test will be added via PR #11964.

@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Jul 16, 2020
@Splaktar Splaktar self-assigned this Jul 16, 2020
@Splaktar Splaktar added P2: required Issues that must be fixed. type: bug labels Jul 16, 2020
@Splaktar Splaktar added this to the 1.2.0 milestone Jul 16, 2020
@Splaktar Splaktar requested a review from mmalerba July 16, 2020 19:33
- `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
@Splaktar Splaktar force-pushed the navbar-fix-exception branch from 4673bdf to 15181ff Compare July 16, 2020 19:43
@Splaktar Splaktar added the pr: merge ready This PR is ready for a caretaker to review label Jul 16, 2020
@Splaktar Splaktar removed the request for review from mmalerba July 17, 2020 20:46
@Splaktar Splaktar added the pr: lgtm This PR has been approved by the reviewer label Jul 17, 2020
@Splaktar Splaktar merged commit b1c7154 into master Jul 17, 2020
@Splaktar Splaktar deleted the navbar-fix-exception branch July 17, 2020 20:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P2: required Issues that must be fixed. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants