-
-
Notifications
You must be signed in to change notification settings - Fork 470
Open
Labels
topic: cloudRelated to Arduino Cloud and cloud sketchesRelated to Arduino Cloud and cloud sketchestopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
Describe the problem
See title.
Error:
sketchbook-widget-contribution.ts:246 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'revealFile')
at SketchbookWidgetContribution.selectWidgetFileNode (sketchbook-widget-contribution.ts:246)
The problem should be solved here.
arduino-ide/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget-contribution.ts
Lines 240 to 256 in 0d05509
async selectWidgetFileNode(widget: Widget | undefined): Promise<void> { | |
if (Navigatable.is(widget)) { | |
const resourceUri = widget.getResourceUri(); | |
if (resourceUri) { | |
const treeWidget = (await this.widget).getTreeWidget(); | |
const { model } = treeWidget; | |
const node = await model.revealFile(resourceUri); | |
if (SelectableTreeNode.is(node)) { | |
model.selectNode(node); | |
} | |
} | |
} | |
} | |
protected onCurrentWidgetChangedHandler(): void { | |
this.selectWidgetFileNode(this.shell.currentWidget); | |
} |
To reproduce
Open the cloud sketchbook tree and the settings.jon
file and edit the settings.json
file. IDE2 tries to blindly reveal the corresponding node in the sketchbook tree, but it's not there.
Expected behavior
No error.
Arduino IDE version
#1581, but I think it's the same from the main
Operating system
macOS
Operating system version
12.5.1
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details
Metadata
Metadata
Assignees
Labels
topic: cloudRelated to Arduino Cloud and cloud sketchesRelated to Arduino Cloud and cloud sketchestopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project