Update index.js

Fixed boolean issue when false.