Update index.js

fixed an error