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

pull/8569/head
Simon Holthausen 3 years ago
parent fdac619131
commit b67fda1be1

@ -6,16 +6,13 @@ import { x, p } from 'code-red';
* @param {import('../Renderer.js').RenderOptions} options
*/
export default function (node, renderer, options) {
if (!options.dev)
return;
const filename = options.filename || null;
const { line, column } = options.locate(node.start + 1);
const obj = x `{
${node.expressions.map((e) => p `${e.node.name}`)}
if (!options.dev) return;
const filename = options.filename || null;
const { line, column } = options.locate(node.start + 1);
const obj = x`{
${node.expressions.map((e) => p`${e.node.name}`)}
}`;
renderer.add_expression(x `@debug(${filename ? x `"${filename}"` : x `null`}, ${line - 1}, ${column}, ${obj})`);
renderer.add_expression(
x`@debug(${filename ? x`"${filename}"` : x`null`}, ${line - 1}, ${column}, ${obj})`
);
}

Loading…
Cancel
Save