react-isomorphic-tools
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -45,9 +45,10 @@ 'use strict'; | ||
components = (0, _preload2.getComponents)(components); | ||
console.log(components); | ||
if (!components.length) { | ||
_context.next = 19; | ||
_context.next = 20; | ||
break; | ||
} | ||
_context.prev = 2; | ||
_context.prev = 3; | ||
@@ -57,5 +58,5 @@ dispatch((0, _preload.start)()); | ||
case 5: | ||
case 6: | ||
if ((_context.t1 = _context.t0()).done) { | ||
_context.next = 13; | ||
_context.next = 14; | ||
break; | ||
@@ -67,7 +68,7 @@ } | ||
if (!components.hasOwnProperty(i)) { | ||
_context.next = 11; | ||
_context.next = 12; | ||
break; | ||
} | ||
_context.next = 10; | ||
_context.next = 11; | ||
return components[i].preload({ | ||
@@ -86,3 +87,3 @@ getState: getState, | ||
case 10: | ||
case 11: | ||
dispatch((0, _preload.push)({ | ||
@@ -94,18 +95,18 @@ displayName: components[i].displayName, | ||
case 11: | ||
_context.next = 5; | ||
case 12: | ||
_context.next = 6; | ||
break; | ||
case 13: | ||
case 14: | ||
dispatch((0, _preload.finish)()); | ||
_context.next = 19; | ||
_context.next = 20; | ||
break; | ||
case 16: | ||
_context.prev = 16; | ||
_context.t2 = _context['catch'](2); | ||
case 17: | ||
_context.prev = 17; | ||
_context.t2 = _context['catch'](3); | ||
dispatch((0, _preload.error)(_context.t2)); | ||
case 19: | ||
case 20: | ||
case 'end': | ||
@@ -115,3 +116,3 @@ return _context.stop(); | ||
} | ||
}, _callee, undefined, [[2, 16]]); | ||
}, _callee, undefined, [[3, 17]]); | ||
})); | ||
@@ -118,0 +119,0 @@ |
@@ -149,3 +149,2 @@ 'use strict'; | ||
return components.filter(function (item) { | ||
console.log(item, typeof item == 'function', item.hasOwnProperty('preload'), item.hasOwnProperty('preload') && typeof item.preload == 'function'); | ||
return typeof item == 'function' && item.hasOwnProperty('preload') && typeof item.preload == 'function'; | ||
@@ -152,0 +151,0 @@ }); |
{ | ||
"name": "react-isomorphic-tools", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Authorization, Fetcher, Preload. Tools for ServerSide rendering", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -8,2 +8,3 @@ import {push, start, finish, error} from '../actions/preload' | ||
components = getComponents(components) | ||
console.log(components) | ||
if (components.length) { | ||
@@ -10,0 +11,0 @@ try { |
@@ -58,8 +58,5 @@ import lodash from 'lodash' | ||
const getComponents = (components) => { | ||
return components.filter((item)=>{ | ||
console.log(item, typeof item == 'function', item.hasOwnProperty('preload'), item.hasOwnProperty('preload') && typeof item.preload == 'function') | ||
return typeof item == 'function' && item.hasOwnProperty('preload') && typeof item.preload == 'function' | ||
}) | ||
return components.filter((item)=>typeof item == 'function' && item.hasOwnProperty('preload') && typeof item.preload == 'function') | ||
} | ||
export {loadData, getComponents} |
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
61150
1433