What is the current behavior?
I'm using your dependency in my plugin and I'm getting this error (otherwise everything works fine):
plugin:another-dynamic-highlights:64 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'forEach')
at At.destroy (plugin:another-dynamic-highlights:64:5296)
at At.destroyAndRemove (plugin:another-dynamic-highlights:64:5416)
at Hr.hide (plugin:another-dynamic-highlights:70:1074)
at SettingsSearch.getTabResources (plugin:settings-search:249:9)
It leads to code from your dependency:
destroy() {
cancelAnimationFrame(this._setupAnimationFrame),
this._eventBindings.forEach((z => O(...z))),
Object.keys(this._components).forEach((z => this._components[z].destroy()))
}
I guess you're just missing a null guard here.
Please provide the steps to reproduce and create a JSFiddle.
To reproduce it, open an Obsidian vault with v1.2.10 of my plugin installed, I guess? I don't think a fiddle would be helpful here.
https://github.com/tine-schreibt/aDHL/releases/tag/1.2.10
What is the expected behavior?
To not throw an error like that.
Your environment:
Version (see Pickr.version): "@simonwep/pickr": "^1.9.1",
Used bundle (es5 or normal one): Whatever `npm install` put in my repo
Used theme (default is classic): the default
Browser-version: Obsidian 1.12.3
Operating-system: LinuxMint
What is the current behavior?
I'm using your dependency in my plugin and I'm getting this error (otherwise everything works fine):
plugin:another-dynamic-highlights:64 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'forEach')
at At.destroy (plugin:another-dynamic-highlights:64:5296)
at At.destroyAndRemove (plugin:another-dynamic-highlights:64:5416)
at Hr.hide (plugin:another-dynamic-highlights:70:1074)
at SettingsSearch.getTabResources (plugin:settings-search:249:9)
It leads to code from your dependency:
destroy() {
cancelAnimationFrame(this._setupAnimationFrame),
this._eventBindings.forEach((z => O(...z))),
Object.keys(this._components).forEach((z => this._components[z].destroy()))
}
I guess you're just missing a null guard here.
Please provide the steps to reproduce and create a JSFiddle.
To reproduce it, open an Obsidian vault with v1.2.10 of my plugin installed, I guess? I don't think a fiddle would be helpful here.
https://github.com/tine-schreibt/aDHL/releases/tag/1.2.10
What is the expected behavior?
To not throw an error like that.
Your environment: