Skip to content

Commit bda6ce0

Browse files
committed
chore: callback is not undefined
1 parent 7619ff9 commit bda6ce0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/renderer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ function internalRender(markdownText: string, scopeName: string = "text.plain"):
7171
highlight: function (code, lang, callback) {
7272
highlight(code, scopeName)
7373
.then((codeResult) => {
74-
callback?.(null, codeResult.join("\n"))
74+
callback!(null, codeResult.join("\n"))
7575
})
7676
.catch((e) => {
77-
callback?.(e)
77+
callback!(e)
7878
})
7979
},
8080
},

0 commit comments

Comments
 (0)