fixing javascript no method error in asset debug mode.