react-isomorphic-tools
Advanced tools
Comparing version 1.3.5 to 1.3.6
@@ -57,3 +57,3 @@ 'use strict'; | ||
if (!components.length) { | ||
_context.next = 21; | ||
_context.next = 22; | ||
break; | ||
@@ -67,3 +67,3 @@ } | ||
if ((_context.t1 = _context.t0()).done) { | ||
_context.next = 20; | ||
_context.next = 21; | ||
break; | ||
@@ -75,3 +75,3 @@ } | ||
if (!components.hasOwnProperty(i)) { | ||
_context.next = 18; | ||
_context.next = 19; | ||
break; | ||
@@ -104,3 +104,8 @@ } | ||
case 15: | ||
_context.next = 17; | ||
if (!component.hasOwnProperty('preload')) { | ||
_context.next = 18; | ||
break; | ||
} | ||
_context.next = 18; | ||
return component.preload({ | ||
@@ -119,3 +124,3 @@ getState: getState, | ||
case 17: | ||
case 18: | ||
dispatch((0, _preload.push)({ | ||
@@ -127,10 +132,10 @@ displayName: components[i].displayName, | ||
case 18: | ||
case 19: | ||
_context.next = 8; | ||
break; | ||
case 20: | ||
case 21: | ||
dispatch((0, _preload.finish)()); | ||
case 21: | ||
case 22: | ||
case 'end': | ||
@@ -137,0 +142,0 @@ return _context.stop(); |
{ | ||
"name": "react-isomorphic-tools", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "Authorization, Fetcher, Preload. Tools for ServerSide rendering", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -1,2 +0,2 @@ | ||
import {push, start, finish, error} from '../actions/preload' | ||
import {push, start, finish} from '../actions/preload' | ||
import {getComponents} from '../helpers/preload' | ||
@@ -36,12 +36,14 @@ import {fetcher, fetchToState} from 'react-isomorphic-tools' | ||
} | ||
await component.preload({ | ||
getState, | ||
dispatch, | ||
routes, | ||
params, | ||
location, | ||
router, | ||
fetcher, | ||
fetchToState: (url, params)=>dispatch(fetchToState(url, params)) | ||
}, props) | ||
if(component.hasOwnProperty('preload')){ | ||
await component.preload({ | ||
getState, | ||
dispatch, | ||
routes, | ||
params, | ||
location, | ||
router, | ||
fetcher, | ||
fetchToState: (url, params)=>dispatch(fetchToState(url, params)) | ||
}, props) | ||
} | ||
dispatch(push({ | ||
@@ -48,0 +50,0 @@ displayName: components[i].displayName, |
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
150298
1967