Skip to content

Commit

Permalink
[FIX] Add warning back in (#4880)
Browse files Browse the repository at this point in the history
Fixes #4869 

As far as I can see, @ToniSkulj removed this warning in #4320, I suspect by accident, but if not, let me know :) 

See:
<img width="1116" alt="image" src="https://github.com/hedyorg/hedy/assets/1003685/4c8d2319-6a9f-4772-8f3b-2541417bcff3">

**How to test**
Observe that code with a space at the start runs but also throws an error:

<img width="701" alt="image" src="https://github.com/hedyorg/hedy/assets/1003685/29e2191f-dbc8-4063-91ef-ebf24a1a896e">
  • Loading branch information
Felienne committed Dec 12, 2023
1 parent 7e6c9b7 commit 49dd7db
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 38 deletions.
5 changes: 5 additions & 0 deletions static/js/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ export async function runit(level: number, lang: string, disabled_prompt: string
program_data = response;
console.log('Response', response);

if (response.Warning && $('#editor').is(":visible")) {
//storeFixedCode(response, level);
error.showWarning(ClientMessages['Transpile_warning'], response.Warning);
}

showAchievements(response.achievements, false, "");
if (adventure && response.save_info) {
adventure.save_info = response.save_info;
Expand Down
72 changes: 36 additions & 36 deletions static/js/appbundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/appbundle.js.map

Large diffs are not rendered by default.

0 comments on commit 49dd7db

Please sign in to comment.