Small change to client.js sync code

Both conditions were firing when the 'jsonOrCb' parameter was an object. Added missing if.