Skip to content

Commit

Permalink
Fix infitite loop on undefined message (#37)
Browse files Browse the repository at this point in the history
* Fix infitite loop on undefined message

* Rev version
  • Loading branch information
mosuem authored Jun 12, 2023
1 parent cd8926c commit 01a88e4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
3 changes: 3 additions & 0 deletions src/codeactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 01a88e4

Please sign in to comment.