Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

[Flow] Upgrade to 68 - #6501

Merged
jasonLaster merged 1 commit into
firefox-devtools:masterfrom
jasonLaster:flow-68
Jun 16, 2018
Merged

[Flow] Upgrade to 68#6501
jasonLaster merged 1 commit into
firefox-devtools:masterfrom
jasonLaster:flow-68

Conversation

@jasonLaster

Copy link
Copy Markdown
Contributor

Fixes Issue: #5687

Comment thread src/reducers/sources.js Outdated
case "MOVE_TAB":
return state.merge({
tabs: updateTabList({ sources: state }, action.url, action.tabIndex)
tabs: updateTabList(state.sources.tabs, action.url, action.tabIndex)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be easier if we did state.sources.tabs || []?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, what's the benefit of that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I (thought I) saw a circle failure due to updateTabList returning undefined

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it. We might be able to add a sensible default in initializer

@wldcordeiro

Copy link
Copy Markdown
Contributor

👀 looking at this and then the 70 PR now.

Comment thread src/reducers/sources.js
function updateTabList(state: OuterState, url: ?string, tabIndex?: number) {
let tabs = state.sources.tabs;

function updateTabList(tabs: TabList, url: ?string, tabIndex?: number) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failures because tabs is undefined and we try to indexOf it.

@jasonLaster
jasonLaster force-pushed the flow-68 branch 2 times, most recently from 7e5eeba to 47523f3 Compare June 13, 2018 16:46
@jasonLaster
jasonLaster merged commit 3149abc into firefox-devtools:master Jun 16, 2018
jasonLaster added a commit that referenced this pull request Jun 28, 2018
jasonLaster added a commit that referenced this pull request Jun 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants