Update index.js to fix undefined problem when run on node 10.22
Merge pull request #1 from zneo99/master

Update index.js to fix undefined problem when run on node 10.22