Bug
Upon encountering an Obsidian Canvas in the initial import of the files into Datacore when starting up Obsidian, the scheduel method of the FileImporter throws the following error:
Environment
OS: Archlinux
Obsidian: 1.12.4
Datacore: 0.1.28
To reproduce
- Have a test.md file at the root of your vault. Only have a datacore codebloc within with the following code inside it:
return function View() {
return <p>Hello!</p>;
}
- Have an obsidian canvas file at the root of your vault.
- Enable Datacore and restard Obsidian.
The Test.md file should show something like this:
and the error should appear in the obsidian developper Console.
What I have found
It seems like the FileImporter's fileManager is undefined as it's not initialized in the constructor. Entering the canvas case of the scheduel() function should therefore always trigger the nullish coalescing operator on line 111.
However, when I go look into the datacore installed file (.obsidian/plugins/datacore/main.js), the optional chaining operators and the nullish coalescing operator, as well as it's right side, are completely missing!
Could it be that the operators were removed as a result of some undesired build optimization?
After manually adding them to the main.js file and restarting obsidian, the error message changes:
but it no longer breaks the codeblock:

Bug
Upon encountering an Obsidian Canvas in the initial import of the files into Datacore when starting up Obsidian, the scheduel method of the FileImporter throws the following error:
Environment
OS: Archlinux
Obsidian: 1.12.4
Datacore: 0.1.28
To reproduce
The Test.md file should show something like this:
and the error should appear in the obsidian developper Console.
What I have found
It seems like the FileImporter's fileManager is undefined as it's not initialized in the constructor. Entering the canvas case of the scheduel() function should therefore always trigger the nullish coalescing operator on line 111.
However, when I go look into the datacore installed file (.obsidian/plugins/datacore/main.js), the optional chaining operators and the nullish coalescing operator, as well as it's right side, are completely missing!
Could it be that the operators were removed as a result of some undesired build optimization?
After manually adding them to the main.js file and restarting obsidian, the error message changes:
but it no longer breaks the codeblock: