Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Fix destructuring bug in Status #231

Merged
merged 3 commits into from
Feb 20, 2019
Merged

Fix destructuring bug in Status #231

merged 3 commits into from
Feb 20, 2019

Conversation

sumanvyj
Copy link
Contributor

When Status is rendered in the browser I get TypeError: Cannot read property 'staticContext' of undefined. It looks like this is because Status expects router to be present as a property of context. This is the case for ServerRouter but not for BrowserRouter.

By destructuring with a default value of {} for router, staticContext is correctly set to undefined when router doesn't exist.

@CLAassistant
Copy link

CLAassistant commented Feb 19, 2019

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Feb 20, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@17aa5bd). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #231   +/-   ##
=========================================
  Coverage          ?   79.26%           
=========================================
  Files             ?       10           
  Lines             ?      217           
  Branches          ?       48           
=========================================
  Hits              ?      172           
  Misses            ?       30           
  Partials          ?       15
Impacted Files Coverage Δ
src/modules/Status.js 90.9% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17aa5bd...0a955a9. Read the comment docs.

@sumanvyj
Copy link
Contributor Author

one last tweak to fix the type

@KevinGrandon
Copy link
Contributor

!merge

@old-fusion-bot old-fusion-bot bot merged commit 379a6ba into fusionjs:master Feb 20, 2019
@old-fusion-bot
Copy link

Triggered Fusion.js build verification: https://buildkite.com/uberopensource/fusion-release-verification/builds/1561

@sumanvyj sumanvyj deleted the sumanvyj/status_bug branch February 20, 2019 18:40
This was referenced Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants