Skip to content

Commit ec1fba8

Browse files
fix: suppress lifecycle warning in getRoutifyFragmentContext
1 parent 8963187 commit ec1fba8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/runtime/utils/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const getRoutifyFragmentContext = () => {
5050
return getContext(CTX)
5151
} catch (e) {
5252
if (e.message.includes('lifecycle_outside_component')) {
53+
if (globalThis._routify_suppress_life_cycle_warning) return
5354
console.error(
5455
'Routify: Unable to access context.\n' +
5556
"If you're using Svelte 5, ensure $ helpers are accessed at the root level of your component.",

0 commit comments

Comments
 (0)