dappuniversity / token_sale

Code Your Own Cryptocurrency & ICO on Ethereum | Tutorial
406 stars 387 forks source link

Cannot Read Property 'indexOf' of Undefined #17

Closed SiriuXProtocoL closed 3 years ago

SiriuXProtocoL commented 5 years ago

Error handling failing due to this error

gabefighter99 commented 5 years ago

I second this.. kinda. indexOf is not a function is the error I get

Madeindreams commented 4 years ago

I have fixed them by changing assert(error.message.indexOf('revert') >= 0, 'cannot transfer value larger than balance'); for assert(error.message, 'cannot transfer value larger than balance');

teddy-mczieuwa commented 3 years ago

Thank @Madeindreams I also struggled with this issue. Your solution worked for me