[core][js][bug] fix wrod slicing