From 07a667c664a59c4ced2077fe158753f25c1d08b9 Mon Sep 17 00:00:00 2001 From: a1mery <7100077+a1mery@users.noreply.github.com> Date: Tue, 11 Jul 2023 00:55:37 +0200 Subject: [PATCH] iterate through all pages --- samples/react-graph-webpart-report/src/webparts/WebPartData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/react-graph-webpart-report/src/webparts/WebPartData.ts b/samples/react-graph-webpart-report/src/webparts/WebPartData.ts index d30263601..054e81891 100644 --- a/samples/react-graph-webpart-report/src/webparts/WebPartData.ts +++ b/samples/react-graph-webpart-report/src/webparts/WebPartData.ts @@ -7,7 +7,7 @@ export async function _getSiteWebParts(service: IGraphService, siteId: string): try { const siteWebParts: WebPart[] = []; const sitePages: SitePage[] = await service.GetSitePages(siteId); - for (let i: number = 0; i < sitePages.length - 1; i++) { + for (let i: number = 0; i <= sitePages.length - 1; i++) { const graphWebParts: GraphWebPartCollection | null = await service.GetWebParts(siteId, sitePages[i].id); if (graphWebParts !== null) { graphWebParts.value.forEach(siteWebPart => {