[core][js] fix spell suggestion engine