|
|
|
|
@ -21,17 +21,15 @@ export default function (node, renderer, options) {
|
|
|
|
|
* @type {undefined}
|
|
|
|
|
*/
|
|
|
|
|
const then = renderer.pop();
|
|
|
|
|
renderer.add_expression(x `
|
|
|
|
|
renderer.add_expression(x`
|
|
|
|
|
function(__value) {
|
|
|
|
|
if (@is_promise(__value)) {
|
|
|
|
|
__value.then(null, @noop);
|
|
|
|
|
return ${pending};
|
|
|
|
|
}
|
|
|
|
|
return (function(${node.then_node ? node.then_node : ''}) { ${get_const_tags(node.then.const_tags)}; return ${then}; }(__value));
|
|
|
|
|
return (function(${node.then_node ? node.then_node : ''}) { ${get_const_tags(
|
|
|
|
|
node.then.const_tags
|
|
|
|
|
)}; return ${then}; }(__value));
|
|
|
|
|
}(${node.expression.node})
|
|
|
|
|
`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|