fusionjs / fusion-plugin-react-router

Migrated to https://github.com/fusionjs/fusionjs
MIT License
4 stars 21 forks source link

Fix destructuring bug in Status #231

Closed sumanvyj closed 5 years ago

sumanvyj commented 5 years ago

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 commented 5 years ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 5 years ago

Codecov Report

:exclamation: 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 commented 5 years ago

one last tweak to fix the type

KevinGrandon commented 5 years ago

!merge

old-fusion-bot[bot] commented 5 years ago

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