@klodd/ds 3.10.4 → 3.10.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/js/turbo-nav.js +7 -0
  2. package/package.json +1 -1
package/js/turbo-nav.js CHANGED
@@ -291,6 +291,13 @@
291
291
  const guardedSwap = () => { swapDone = true; swap(); };
292
292
  try {
293
293
  const transition = document.startViewTransition( guardedSwap );
294
+ // Silence rejections on all three transition promises
295
+ // (ready, updateCallbackDone, finished). InvalidStateError
296
+ // can fire on any of them when browser VT-state goes bad.
297
+ // Without this, unhandled rejections show as console
298
+ // exceptions even though navigation otherwise works.
299
+ [ transition.ready, transition.updateCallbackDone, transition.finished ]
300
+ .forEach( ( p ) => p.catch( () => {} ) );
294
301
  try { await transition.finished; } catch ( _ ) { /* ignore */ }
295
302
  } catch ( _ ) {
296
303
  // startViewTransition() threw synchronously (e.g. InvalidStateError).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klodd/ds",
3
- "version": "3.10.4",
3
+ "version": "3.10.5",
4
4
  "description": "Klodd shared design system - tokens, components, JS",
5
5
  "main": "css/index.css",
6
6
  "bin": {