Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when renaming contract while Interact window is open #157

Closed
filippsen opened this issue Sep 11, 2018 · 1 comment
Closed

TypeError when renaming contract while Interact window is open #157

filippsen opened this issue Sep 11, 2018 · 1 comment
Labels
bug Something isn't working Plan Item Feature, task or bug which has has already being planned for developemt

Comments

@filippsen
Copy link
Contributor

filippsen commented Sep 11, 2018

Environment/Browser

Lab 1.0.0 with file renaming enabled

Description

Error when renaming a contract while the Interact window is open leads to broken session.

Steps to reproduce

  1. Create a New project from Hello World template
  2. Expand HelloWorld.sol file
  3. Deploy project
  4. Click Interact
  5. Click Configure
  6. In the Edit Contract window, rename the project
  7. Save

Expected result

No errors

Actual result

The following error appears in the browser console output:

Uncaught TypeError: Cannot read property 'get' of undefined

Hint

In render2 function inside src/components/projecteditor/contractinteraction.js, add the following code after const contract declaration:

// Early return when contract is missing, likely due to a recent rename
if(!contract){
    this.writeContent(1, "Missing file(s), contract not deployed?");
    return;
}
@filippsen filippsen added the bug Something isn't working label Sep 11, 2018
@filippsen filippsen changed the title TypeError when renaming contract while Show Preview window is open TypeError when renaming contract while Interact window is open Sep 11, 2018
@javier-tarazaga javier-tarazaga added the Plan Item Feature, task or bug which has has already being planned for developemt label Sep 17, 2018
@filippsen
Copy link
Contributor Author

Solved with request #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Plan Item Feature, task or bug which has has already being planned for developemt
Projects
None yet
Development

No branches or pull requests

2 participants