diff --git a/CHANGELOG.md b/CHANGELOG.md index 4073960..50de6a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,9 @@ All notable changes to the "arbeditor" extension will be documented in this file. Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. +## [0.0.9] +- Fix [#36](https://github.com/google/arb-editor/issues/36). ## [0.0.8] - Add an icon diff --git a/package.json b/package.json index 36abb07..be2561f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publisher": "Google", "displayName": "ARB Editor", "description": "Editor for Application Resource Bundle files, used for localization.", - "version": "0.0.8", + "version": "0.0.9", "engines": { "vscode": "^1.72.2" }, diff --git a/src/codeactions.ts b/src/codeactions.ts index e9d8b8d..dc55081 100644 --- a/src/codeactions.ts +++ b/src/codeactions.ts @@ -52,6 +52,9 @@ export class CodeActions implements vscode.CodeActionProvider { private createPlaceholder(document: vscode.TextDocument, range: vscode.Range | vscode.Selection): vscode.CodeAction | undefined { const placeholder = this.messageList?.getMessageAt(document.offsetAt(range.start)) as Placeholder | undefined; + if (!placeholder) { + return; + } var parent = placeholder?.parent; while (!(parent instanceof MessageEntry)) { parent = parent?.parent;