mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-02-08 22:14:53 +00:00
iterate through all pages
This commit is contained in:
parent
2dae63f85e
commit
07a667c664
@ -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 => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user