mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/RoboCommander.git
synced 2026-06-16 10:36:02 +00:00
Initial commit
This commit is contained in:
29
node_modules/react-router-redux/selectors.js
generated
vendored
Normal file
29
node_modules/react-router-redux/selectors.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.createMatchSelector = exports.getLocation = undefined;
|
||||
|
||||
var _reactRouter = require('react-router');
|
||||
|
||||
var getLocation = exports.getLocation = function getLocation(state) {
|
||||
return state.router.location;
|
||||
};
|
||||
|
||||
var createMatchSelector = exports.createMatchSelector = function createMatchSelector(path) {
|
||||
var lastPathname = null;
|
||||
var lastMatch = null;
|
||||
return function (state) {
|
||||
var _ref = getLocation(state) || {},
|
||||
pathname = _ref.pathname;
|
||||
|
||||
if (pathname === lastPathname) {
|
||||
return lastMatch;
|
||||
}
|
||||
lastPathname = pathname;
|
||||
var match = (0, _reactRouter.matchPath)(pathname, path);
|
||||
if (!match || !lastMatch || match.url !== lastMatch.url) {
|
||||
lastMatch = match;
|
||||
}
|
||||
return lastMatch;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user