Lint and format src/compiler/compile/render_ssr/handlers/AwaitBlock.js

pull/8569/head
Simon Holthausen 3 years ago
parent 1decd8c95a
commit 837a8b7f60

@ -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})
`);
}

Loading…
Cancel
Save