App.on('resize') fired twice

If the screen rotate from portraits to landscape (e.g. 360 x640 → 640 x 360), the resize event will be fried twice. The debugger shows that the screen scale will be transformed in 3 stages, 360 x 640 → 379 x 674 (1st resize event) → 640 x 360 (2nd resize event). How can it be executed the function on “ONLY” 2nd resize event and omit the first one?

Because I want to capture the latest screen size to perform further action. For instance, I may use infinite scroll and the flag “allowInfinite” will ONLY execute the first resize event and ignore the 2nd one. How can I overcome that ignore the 1st resize and just execute the 2nd resize event?

use orientationchange event instead