ekelokorpi/panda.js — pull request #102 by sandymacpherson (2014-09-11 16:50:54+00:00)
Title: Loader fires the completion code even if nothing was loaded

I ran into a problem when using the dynamic loading system to load a custom background for each level in a game. This was the only asset the dynamic loader was going to load, but if another level had already loaded the background image in question (in other words two levels shared a background) then the loader simply returned and never called my 'loaded' callback function. I could work around it by checking if the queue of assets to load is 0 prior to calling into the loader, but it feels like a better solution to me for the loader to call the completion code (including any callback that was provided) even if it didn't load anything.