fix preview update for javascript-compiled version