cherry picked js changes to fix multivaluekey error