0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

astro metadata can be undefined

This commit is contained in:
Matthew Phillips 2024-06-21 14:52:06 -04:00
parent 1da675c1fd
commit 5d09b30051

View file

@ -14,8 +14,8 @@ export function vitePluginServerIslands({ settings }: { settings: AstroSettings
if(id.endsWith('.astro')) {
const info = this.getModuleInfo(id);
if(info?.meta) {
const astro = info.meta.astro as AstroPluginMetadata['astro'];
if(astro.serverComponents.length) {
const astro = info.meta.astro as AstroPluginMetadata['astro'] | undefined;
if(astro?.serverComponents.length) {
if(viteServer) {
for(const comp of astro.serverComponents) {
if(!settings.serverIslandNameMap.has(comp.resolvedPath)) {