loader.js - fix onPercentChange method

In custom loader case where there isn't bar.