Update index.js

Splice too much？