Fix JS logging

Fix JS logging when using loadit=false and there's no load or handle callbacks.

It didn't make the tests fail but there was a console error nonetheless.