Update index.js

Wrong comparison