I'm not sure that I'm following you here. Since `pageNumber' isn't defined, how will this help?

I completely agree that this construction isn't particularly nice though. An alternative would be to wait for all pages to be resolved, but that would mean waiting longer that necessary before loading the destination.