Fix JavaScript bug in branches without a master