File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ async function callingPattern() {
17
17
// Creating a new page iterator instance with client a graph client instance, page collection response from request and callback
18
18
let pageIterator = new PageIterator (client , response , callback );
19
19
// This iterates the collection until the nextLink is drained out.
20
- pageIterator .iterate ();
20
+ await pageIterator .iterate ();
21
21
} catch (e ) {
22
22
throw e ;
23
23
}
@@ -44,12 +44,12 @@ async function customSize() {
44
44
};
45
45
let pageIterator = new PageIterator (client , response , callback );
46
46
// This stops iterating over for 1000 entities.
47
- pageIterator .iterate ();
47
+ await pageIterator .iterate ();
48
48
49
49
// Resuming will do start from where it left off and iterate for next 1000 entities.
50
50
// Check and resume is likely to be called in any user interaction requiring to load more data.
51
51
if (! pageIterator .isComplete ()) {
52
- pageIterator .resume ();
52
+ await pageIterator .resume ();
53
53
}
54
54
} catch (e ) {
55
55
throw e ;
You can’t perform that action at this time.
0 commit comments