When used inside a canvas card, js-engine code blocks fail to render. It seems that the problem lies here
Within a .canvas file, the ctx.sourcePath property sent by the MarkdownCodeBlockProcessor callback is equal to an empty string. Thus, your getExecutionFile returns undefined as expected and the call to getFileCache fails since it expects a TFile
When used inside a canvas card,
js-engine
code blocks fail to render. It seems that the problem lies hereWithin a .canvas file, the
ctx.sourcePath
property sent by the MarkdownCodeBlockProcessor callback is equal to an empty string. Thus, yourgetExecutionFile
returns undefined as expected and the call togetFileCache
fails since it expects a TFile