Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit bfb9755

Browse files
Fix code snippet in getting started guide (#434)
Description of changes Updates a code snippet from the getting started guide that demonstrated an improper way of disposing of webview panel resources when the panel is closed.
1 parent b4facb3 commit bfb9755

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ With the `dispose` method defined, you also need to update the constructor metho
157157
private constructor(panel: vscode.WebviewPanel) {
158158
// ... other code ...
159159

160-
this._panel.onDidDispose(this.dispose, null, this._disposables);
160+
this._panel.onDidDispose(() => this.dispose(), null, this._disposables);
161161
}
162162
```
163163

0 commit comments

Comments
 (0)