Skip to content

Commit

Permalink
Fixed an issue with an error that could occur while looking for the c…
Browse files Browse the repository at this point in the history
…urrent error.
  • Loading branch information
neilccbrown committed Jan 23, 2025
1 parent e440a56 commit 5a10821
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,10 @@ export default Vue.extend({
const isFullIndex = ((this.currentErrorNavIndex % 1) == 0);
this.currentErrorNavIndex += (((toNext) ? 1 : -1) / ((isFullIndex) ? 1 : 2));
const errorElement = getEditorCodeErrorsHTMLElements()[this.currentErrorNavIndex];
if (errorElement == null) {
// If there's no longer an error, don't do anything:
return;
}
// The error can be in a slot or it can be for a whole frame. By convention, the location for a frame error is the caret above it.
// For errors in a slot: we focus on the slot of the error -- if the erroneous HTML is a slot, we just give it focus. If the error is at the frame scope
// we put the focus in the first slot that is editable.
Expand Down

0 comments on commit 5a10821

Please sign in to comment.