@sanity/state-router
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -59,2 +59,3 @@ 'use strict'; | ||
var location = _props.location; | ||
var state = _props.state; | ||
@@ -68,3 +69,3 @@ return { | ||
navigate: this.navigateState, | ||
state: router.decode(location.pathname) | ||
state: state || router.decode(location.pathname) | ||
} | ||
@@ -89,2 +90,3 @@ }; | ||
}), | ||
state: _react.PropTypes.object, | ||
children: _react.PropTypes.node | ||
@@ -91,0 +93,0 @@ }; |
{ | ||
"name": "@sanity/state-router", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A path pattern => state object bidirectional mapper", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -10,2 +10,3 @@ import React, {PropTypes} from 'react' | ||
}), | ||
state: PropTypes.object, | ||
children: PropTypes.node | ||
@@ -28,3 +29,3 @@ } | ||
getChildContext() { | ||
const {router, location} = this.props | ||
const {router, location, state} = this.props | ||
return { | ||
@@ -37,3 +38,3 @@ __internalRouter: { | ||
navigate: this.navigateState, | ||
state: router.decode(location.pathname) | ||
state: state || router.decode(location.pathname) | ||
} | ||
@@ -40,0 +41,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
64857
1614
0