Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-isomorphic-tools

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-isomorphic-tools - npm Package Compare versions

Comparing version 3.0.0-alpha.11 to 3.0.0-alpha.12

23

dist/redux/middlewares/preload.js

@@ -9,2 +9,6 @@ 'use strict';

var _ReduxResolver = require('../../Resolver/ReduxResolver');
var _ReduxResolver2 = _interopRequireDefault(_ReduxResolver);
var _constants = require('../constants');

@@ -14,2 +18,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var lock = true;

@@ -19,3 +25,3 @@

exports.default = function (history, resolver) {
exports.default = function (history) {
return function (store) {

@@ -36,11 +42,4 @@ return function (next) {

if (action.payload.code === 303) {
var _action$payload = action.payload,
to = _action$payload.to,
e = _action$payload.e,
location = _action$payload.location;
next(action);
store.dispatch((0, _reactRouterRedux.push)(to === '/error' ? {
pathname: to, search: '?errorData=' + JSON.stringify({ location: location, e: e })
} : to));
store.dispatch((0, _reactRouterRedux.push)('/'));
}

@@ -54,5 +53,5 @@

} else {
resolver.resolve(history.location).then(function () {
next(action);
}).catch(function (e) {
var resolver = new _ReduxResolver2.default();
next(action);
resolver.resolve(history.location).then(function () {}).catch(function (e) {
store.dispatch((0, _preload.fail)(e, history.location));

@@ -59,0 +58,0 @@ });

@@ -34,10 +34,2 @@ 'use strict';

_this.handleLocationChange = function () {
var _this$props = _this.props,
resolver = _this$props.resolver,
history = _this$props.history;
resolver.resolve(history.location);
};
_this.resolver = props.resolver;

@@ -53,14 +45,2 @@ return _this;

}, {
key: 'componentDidMount',
value: function componentDidMount() {
var history = this.props.history;
this.unsubscribeFromHistory = history.listen(this.handleLocationChange);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this.unsubscribeFromHistory) this.unsubscribeFromHistory();
}
}, {
key: 'render',

@@ -77,3 +57,2 @@ value: function render() {

resolver: _propTypes2.default.object.isRequired,
history: _propTypes2.default.object.isRequired,
children: _propTypes2.default.element.isRequired

@@ -80,0 +59,0 @@ };

{
"name": "react-isomorphic-tools",
"version": "3.0.0-alpha.11",
"version": "3.0.0-alpha.12",
"description": "Authorization, Fetcher, Preload. Tools for ServerSide rendering",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc