master-co / css

The CSS Language and Framework
https://css.master.co
MIT License
1.78k stars 41 forks source link

🐞 Default animations throw error on navigation in Svelte #274

Closed oskar-gmerek closed 1 year ago

oskar-gmerek commented 1 year ago

Description

If we add one of the default animations anywhere in the page1, and then navigate to page2, then client will throw error:

Uncaught TypeError: Cannot read properties of undefined (reading 'count')
    at o (index.bundle.mjs:1:55431)
    at _a.delete (index.bundle.mjs:1:55804)
    at MutationObserver.<anonymous> (index.bundle.mjs:1:53414)

This is not the case with the custom animations created in masterCSS config.

Reproduction

  1. git clone https://github.com/oskar-gmerek/mastercss-pr-svelte-bug
  2. git checkout animation-bug
  3. bun install (enjoy speed of bun) & bun run dev OR bun install & bun run build & bun run preview
  4. Go to localhost in browser and open developers tools console
  5. Click any link to navigate to other page and look at browser console
  6. Remove animation @fade|1s|infinite from header and check again - no errors will appear in the console

System Informations

Browser: Latest Brave Browser OS: macOS 14.0 Node: 18 Package manager: Bun 1.0.0

oskar-gmerek commented 1 year ago

Forget to mention that, in addition to error in console there is also broken styles (need to refresh page)

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 2.0.0-beta.172 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 9 months ago

:tada: This issue has been resolved in version 2.0.0-rc.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: