mgmeyers / obsidian-embedded-note-titles

GNU General Public License v3.0
58 stars 5 forks source link

Error in javascript console #31

Closed dcoales closed 2 years ago

dcoales commented 2 years ago

I'm seeing lots of recurring instances of the following error in the the javascript console. These only appear when this plugin is enabled. Doesn't seem to cause any real adverse effect but I thought you might like to know.

VM300:810 Uncaught DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
    at getSheetRules (eval at <anonymous> (app://obsidian.md/app.js:1:1490278), <anonymous>:810:31)
    at getMatchedCSSRules (eval at <anonymous> (app://obsidian.md/app.js:1:1490278), <anonymous>:895:25)
    at getRefSizing (eval at <anonymous> (app://obsidian.md/app.js:1:1490278), <anonymous>:1084:19)
    at PreviewHeadingsManager.getPreviewSizerStyles (eval at <anonymous> (app://obsidian.md/app.js:1:1490278), <anonymous>:1268:36)
    at PreviewHeadingsManager.createHeading (eval at <anonymous> (app://obsidian.md/app.js:1:1490278), <anonymous>:1286:18)
    at eval (eval at <anonymous> (app://obsidian.md/app.js:1:1490278), <anonymous>:1319:22)
    at Array.forEach (<anonymous>)
    at PreviewHeadingsManager.createHeadings (eval at <anonymous> (app://obsidian.md/app.js:1:1490278), <anonymous>:1316:51)
    at eval (eval at <anonymous> (app://obsidian.md/app.js:1:1490278), <anonymous>:1422:49)
mgmeyers commented 2 years ago

Thanks @dcoales. I added some protection against this. Let me know if you still get this error

dcoales commented 2 years ago

Seems to have done the job. I’m not seeing the errors any more. Thanks.