diff --git a/dist/switcheroo.min.js b/dist/switcheroo.min.js index 5df537c..00e4cd8 100644 --- a/dist/switcheroo.min.js +++ b/dist/switcheroo.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("window")):"function"==typeof define&&define.amd?define(["react","window"],t):"object"==typeof exports?exports.switcheroo=t(require("react"),require("window")):e.switcheroo=t(e.React,e.window)}(this,function(e,t){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";t.Switcher=o(3),t.Switch=o(2)},function(t,o,n){t.exports=e},function(e,t,o){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(e,t){for(var o=0;o { - return child.props.path === path; + return `${this.props.basePath}${child.props.path}` === path; })[0]; } @@ -97,12 +97,14 @@ Switcher.propTypes = { defaultHandlerProps: React.PropTypes.object, onChange: React.PropTypes.func, wrapper: React.PropTypes.any, - location: React.PropTypes.string + location: React.PropTypes.string, + baseURL: React.PropTypes.string }; Switcher.defaultProps = { pushState: false, hashChange: true, load: true, - location: 'hash' + location: 'hash', + basePath: '' };