Skip to content

Commit

Permalink
Fix project name validation for non examples
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober committed Sep 9, 2024
1 parent 4c7fe3a commit 3264f61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ var exampleSupportedBoards = [];

// returns true if project name input is valid
function projectNameFormValidation(projectNameElement) {
if (typeof examples !== 'undefined') {
// TODO: put into helper function
const createFromExampleBtn = document.getElementById('btn-create-from-example');
const isExampleMode = createFromExampleBtn ? createFromExampleBtn.getAttribute('data-example-mode') === 'true' : true;
if (isExampleMode) {
return true;
}

Expand Down

0 comments on commit 3264f61

Please sign in to comment.