Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Sep 25, 2023
1 parent 69fbf95 commit 7fc700e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/astro/src/vite-plugin-head/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,28 @@ 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);
}
}
}
return result;
});
}
},
},
transform(source, id) {
if (!server) {
return;
Expand Down

0 comments on commit 7fc700e

Please sign in to comment.