Revert "Fixing issue with loader.js not triggering oncomplete() when data array is an empty array"

This reverts commit 27becb7fe682b7c04292e5bbfbf46e9c9064d460.