Reocin / obsidian-markdown-formatting-assistant-plugin

This Plugin provides a simple WYSIWYG Editor for Markdown and in addition a command line interface. The command line interface facilitate a faster workflow.
251 stars 28 forks source link

conflict with settings search? #65

Open ksdavidc opened 1 year ago

ksdavidc commented 1 year ago

Describe the bug

getting this message consistently in developer console

seems to be a conflict with settings search and will post problem there too... turning off settings search eliminates error message

plugin:obsidian-markdown-formatting-assistant-plugin:5107 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'active')
    at eval (plugin:obsidian-markdown-formatting-assistant-plugin:5107:56)
    at e.addToggle (app.js:1:1135946)
    at SettingsTab.eval (plugin:obsidian-markdown-formatting-assistant-plugin:5106:22)
    at step (plugin:obsidian-markdown-formatting-assistant-plugin:79:23)
    at Object.eval [as next] (plugin:obsidian-markdown-formatting-assistant-plugin:60:53)
    at eval (plugin:obsidian-markdown-formatting-assistant-plugin:53:71)
    at new Promise (<anonymous>)
    at __awaiter (plugin:obsidian-markdown-formatting-assistant-plugin:49:12)
    at SettingsTab.display (plugin:obsidian-markdown-formatting-assistant-plugin:4893:16)
    at SettingsSearch.getTabResources (plugin:settings-search:170:15)

To Reproduce Steps to reproduce the behavior:

  1. open obsidian and developer tools with this plugin and setting search plugin
  2. See error
  3. disable setting search and restart
  4. no error

Expected behavior no error Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

valentine195 commented 1 year ago

Settings Search forces plugin SettingTabs to render when initialized to grab plugin settings to search for, but I don’t see anything at a quick glance through this plugin’s code that would cause this error… seems like you’d get this with or without the settings search plugin if it happens at all.