From 7fc700e30d3d257f5b3d8f4480162076c7e0e8df Mon Sep 17 00:00:00 2001 From: matthewp Date: Mon, 25 Sep 2023 14:17:53 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/vite-plugin-head/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/astro/src/vite-plugin-head/index.ts b/packages/astro/src/vite-plugin-head/index.ts index f89049c5e..58722fdb2 100644 --- a/packages/astro/src/vite-plugin-head/index.ts +++ b/packages/astro/src/vite-plugin-head/index.ts @@ -51,20 +51,20 @@ export default function configHeadVitePlugin(): vite.Plugin { server = _server; }, resolveId(source, importer) { - if(importer) { + if (importer) { // Do propagation any time a new module is imported. This is because // A module with propagation might be loaded before one of its parent pages // is loaded, in which case that parent page won't have the in-tree and containsHead // values. Walking up the tree in resolveId ensures that they do - return this.resolve(source, importer, { skipSelf: true }).then(result => { - if(result) { + return this.resolve(source, importer, { skipSelf: true }).then((result) => { + if (result) { let info = this.getModuleInfo(result.id); const astro = info && getAstroMetadata(info); - if(astro) { - if(astro.propagation === 'self' || astro.propagation === 'in-tree') { + if (astro) { + if (astro.propagation === 'self' || astro.propagation === 'in-tree') { propagateMetadata.call(this, importer, 'propagation', 'in-tree'); } - if(astro.containsHead) { + if (astro.containsHead) { propagateMetadata.call(this, importer, 'containsHead', true); } } @@ -72,7 +72,7 @@ export default function configHeadVitePlugin(): vite.Plugin { return result; }); } - }, + }, transform(source, id) { if (!server) { return;