fix merge reassign to be like update and splice. fix jshint issue