What's the problem
When using the "Print documents to HTML" feature in the Markdown All in One extension, an error popup appears with the message:
Cannot read properties of undefined (reading 'uri')
What's the expected result
The document should be printed/exported to HTML without any errors.
How to reproduce
- Open a Markdown document in VSCode.
- Use the "Print documents to HTML" command from the extension.
- The error message appears.
Other information
It seems the extension tries to access vscode.window.activeTextEditor.document.uri without checking if activeTextEditor is defined, which causes this error when no editor is active.
VSCode version: [your VSCode version]
Markdown All in One extension version: [extension version]
Please add a check for activeTextEditor before accessing its properties to prevent this error.
Thank you for your attention to this issue.