TheComputerM / svelte-materialify

A Material UI Design Component library for Svelte heavily inspired by vuetify.
https://svelte-materialify.vercel.app
MIT License
622 stars 84 forks source link

/styles/reset/ errors after reloading page #115

Closed Florian-Schoenherr closed 3 years ago

Florian-Schoenherr commented 3 years ago

Uncaught (in promise) TypeError: Cannot read property 'content' of undefined https://svelte-materialify.vercel.app/styles/reset/

TheComputerM commented 3 years ago

Are you sure? this is not a problem for me.

Florian-Schoenherr commented 3 years ago

with chrome87 + also with chrome88 image I haven't found any call to .content or something.

TheComputerM commented 3 years ago

I am on brave browser chromium version 88, let us check if anyone else has this issue.

Florian-Schoenherr commented 3 years ago

image inside the gumshoe code

Florian-Schoenherr commented 3 years ago

can't reproduce on firefox-85, google-chrome-88, brave-88

it is an error when the content in body is not loaded and the right nav spy is activated, the spy is controlled by gumshoe

so somewhere it's not passing something in fast enough / passing nothing

Florian-Schoenherr commented 3 years ago

I think gumshoe is dead, this is apparently fixed since 2019: https://github.com/cferdinandi/gumshoe/pull/111

btw I think it happens because the spy assumes there are items? (seems to happen when gumshoe loads before content is available, have also tested with an empty .md file: there the content loads but it always gives back the error (possibly because there are no headers (#toc a's?) present)

marekdedic commented 3 years ago

I can confirm this on FF 86. Basically, if a page is too short, gumshoe breaks. The workaround is to make the page longer.

Florian-Schoenherr commented 3 years ago

@marekdedic thank you! Does the fix in my PR work on your end? There's a vercel preview.

marekdedic commented 3 years ago

Sorry, haven't tried it. IMHO, vendoring it in is a bad architectural decision... Maybe use an alternative like https://www.npmjs.com/package/menuspy?

Florian-Schoenherr commented 3 years ago

@marekdedic thank you for the hint, you're right. Will have to see how the API differs, I just wanted the most basic fix for now. Just noticed it's also unmaintained with some issues, so hm.