Skip to content

Commit 6978f4f

Browse files
fbriconNikolasKomonen
authored andcommitted
Prevent rejected Promise during tag autoclose call (#117)
Signed-off-by: Fred Bricon <[email protected]>
1 parent 7767fcb commit 6978f4f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/tagClosing.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ export function activateTagClosing(tagProvider: (document: TextDocument, positio
6363
timeout = setTimeout(() => {
6464
let position = new Position(rangeStart.line, rangeStart.character + lastChange.text.length);
6565
tagProvider(document, position).then(result => {
66+
if (!result) {
67+
return;
68+
}
6669
let text = result.snippet;
6770
let replaceLocation : Position | Range;
6871
let range : Range = result.range;

0 commit comments

Comments
 (0)