I got the following JS error:
JavaScript error: index.html - line 15 - Uncaught TypeError: Cannot read property 'contract' of undefined
whenever I tried to enter a name and a rating in store fields to add a new rating.
How do I fix this?
I got the following JS error:
JavaScript error: index.html - line 15 - Uncaught TypeError: Cannot read property 'contract' of undefined
whenever I tried to enter a name and a rating in store fields to add a new rating.
How do I fix this?
I'm pretty sure that in the scenario part on the right of the IDE, you haven’t created the contract Rating. So you need to click on the Add Transaction button and create it. After that problem solved ;)
From the code, it seems that it is bound to crash at that line if there is no contract of that name in existence.
I ran that same sample Dapp and I get EXACTLY that same error when the contract has not been created. The code works fine as soon the contract is created! euri10 has got it spot on!