dhxFolder getNumberOfPages() function failing


I have a quick question

When using dhxFolder getNumberOfPages() function it sometimes seems to fail, in most of the time it returns correct total number of pages however, once in a while it returns the number ‘0’ or ‘NaN’ while the total number of page is actually more. Is this a problem?

if it is, is there a way to work around it?

Thanks in advance

If this method will be called before XML fully loaded - it really may return such value. ( beware that xml loading is async. by default )
If data already loaded in folders - the method must return correct values.

If issue occurs for dhtlmxFolders with already loaded data - please provide exact steps to reconstruct issue or any kind of sample ( you can send it directly to support@dhmlx.com )