Comparing version 0.13.1 to 0.13.2
@@ -12,5 +12,19 @@ "use strict"; | ||
} else { | ||
workers.shift()(context, function () { | ||
return flow(workers, done, context); | ||
}); | ||
try { | ||
workers.shift()(context, function () { | ||
return flow(workers, done, context); | ||
}); | ||
} catch (error) { | ||
var props = context.element.props; | ||
if (props && props.onError) { | ||
props.onError.mergeToProps({ error: error }); | ||
props.onError.run(context.element, function () { | ||
return flow(workers, done, context); | ||
}); | ||
} else { | ||
throw error; | ||
} | ||
} | ||
} | ||
@@ -17,0 +31,0 @@ }; |
@@ -156,3 +156,3 @@ 'use strict'; | ||
}; | ||
}), done); | ||
}), done, context); | ||
} | ||
@@ -178,25 +178,13 @@ done(); | ||
var context = { element: element }; | ||
var props = element.props, | ||
debug = element.debug; | ||
try { | ||
(0, _flow2.default)([debug ? _deburger.debuggerIn : _flow.NOOP, normalizeProps, defineChildrenProp, execute, function (context, done) { | ||
if (context.childrenProp.process) { | ||
return (0, _flow2.default)([processResult, resolveExports, processChildren], done, context); | ||
} | ||
done(); | ||
}, debug ? _deburger.debuggerOut : _flow.NOOP], function () { | ||
return done(context.result); | ||
}, context); | ||
} catch (error) { | ||
if (props && props.onError) { | ||
props.onError.mergeToProps({ error: error }); | ||
props.onError.run(element, done); | ||
} else { | ||
throw error; | ||
(0, _flow2.default)([element.debug ? _deburger.debuggerIn : _flow.NOOP, normalizeProps, defineChildrenProp, execute, function (context, done) { | ||
if (context.childrenProp.process) { | ||
return (0, _flow2.default)([processResult, resolveExports, processChildren], done, context); | ||
} | ||
} | ||
done(); | ||
}, element.debug ? _deburger.debuggerOut : _flow.NOOP], function () { | ||
return done(context.result); | ||
}, context); | ||
return context.result; | ||
} |
{ | ||
"name": "actml", | ||
"version": "0.13.1", | ||
"version": "0.13.2", | ||
"description": "Like jsx but for your business logic", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
368512
533