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

Maker: Don't show error overlay when running empty program #14465

Merged
merged 1 commit into from Apr 18, 2017

Conversation

islemaster
Copy link
Contributor

Maker used to display its connection failure overlay when running an empty program, even connection to the board normally succeeds. Now it runs the empty program without complaint.

Before After
maker-before maker-after

Root cause

Because JavaScript empty string "" is falsy, App Lab was not creating an Interpreter at all for empty programs. When this happened with Maker enabled, board connection would fail because part of the connection process is injecting board components into the interpreter, and Maker always assumed it was passed a valid interpreter.

After this change, App Lab does create an interpreter for empty programs, which seems like correct behavior to me (there should always be an interpreter if App Lab is "running"). This also has a subtle effect on the debug console, which I would also consider a bugfix:

Before After
console-before console-after

Follow-up work

We might also be able to remove this conditional from Applab.onTick but I wanted to start with the minimum change to fix this issue first.

@islemaster islemaster merged commit 387c69a into staging Apr 18, 2017
@islemaster islemaster deleted the no-error-on-empty-workspace branch April 18, 2017 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants