From 7d0c3f9ecbf54b2ea118b7dff5fa01d57e5e2851 Mon Sep 17 00:00:00 2001 From: FredKSchott Date: Mon, 27 Jun 2022 18:12:43 +0000 Subject: [PATCH] [ci] format --- packages/integrations/sitemap/src/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/integrations/sitemap/src/index.ts b/packages/integrations/sitemap/src/index.ts index 67990b041e..6c661905f8 100644 --- a/packages/integrations/sitemap/src/index.ts +++ b/packages/integrations/sitemap/src/index.ts @@ -117,14 +117,14 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => { const serializedUrls: SitemapItem[] = []; for (const item of urlData) { const serialized = await Promise.resolve(serialize(item)); - if (serialized) { - serializedUrls.push(serialized); - } + if (serialized) { + serializedUrls.push(serialized); + } + } + if (serializedUrls.length === 0) { + logger.warn('No pages found!'); + return; } - if (serializedUrls.length === 0) { - logger.warn('No pages found!'); - return; - } urlData = serializedUrls; } catch (err) { logger.error(`Error serializing pages\n${(err as any).toString()}`);