-
-
Notifications
You must be signed in to change notification settings - Fork 88
Demos with window and without code do not show the previewer when JS is selected #812
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
Closed
Comments
Actually I was also able to reproduce this issue yesterday with a demo that has no window, so maybe it's not related to having/not having a window. |
It rerenders and reformats the code only in JS |
sonnyp
added a commit
that referenced
this issue
Jan 14, 2024
sonnyp
added a commit
that referenced
this issue
Jan 14, 2024
sonnyp
added a commit
that referenced
this issue
Jan 14, 2024
Fixes #812 Closes #820 This is the culprit https://github.com/workbenchdev/Workbench/blob/58b40d9802d14cbcc613a4f25489858783b808b2/src/window.js#L268-L272C6 For that particular code path (javascript selected, demo without js) it wouldn't update the preview One of the issue is that demos without code shouldn't have `autorun: true`. I will fix that. But in any case - I don't want Workbench to misbehave even if the demo json is incorrect.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The previewer does not show if JavaScript is selected as the language and no code exists. It should instead show the "Show external previewer" button.
Additionally the "Run" button also does nothing in this case. I'm not sure if this is intentional, I think this is normal behaviour for external JS demos already.
Steps to reproduce
The text was updated successfully, but these errors were encountered: