Skip to content

Commit

Permalink
Fix bug that prevented loading the plugin when loading settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-dez committed Oct 5, 2024
1 parent 5d15efc commit 9a7576d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "tldraw",
"name": "Tldraw",
"version": "1.8.0",
"version": "1.8.1",
"minAppVersion": "0.15.0",
"description": "Integrates Tldraw into Obsidian, allowing users to draw and edit content on a virtual whiteboard.",
"author": "Sam Alhaqab",
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ export default class TldrawPlugin extends Plugin {
async loadSettings() {
// We destructure the defaults for nested properties, e.g `embeds`, so that we can merge them separately since Object.assign does not merge nested properties.
const { embeds: embedsDefault, ...restDefault } = DEFAULT_SETTINGS;
const { embeds, ...rest } = await this.loadData() as TldrawPluginSettings;
const { embeds, ...rest } = await this.loadData() as Partial<TldrawPluginSettings> || {};
const embedsMerged = Object.assign({}, embedsDefault, embeds)
const restMerged = Object.assign({}, restDefault, rest);

Expand Down

0 comments on commit 9a7576d

Please sign in to comment.