Skip to content

Commit

Permalink
fix: replace console.error with the throw new Error
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobrosenberg committed Jan 22, 2025
1 parent 8980751 commit cb5ff0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runtime/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const getRoutifyFragmentContext = () => {
return getContext(CTX)
} catch (e) {
if (e.message.includes('lifecycle_outside_component')) {
console.error(
throw new Error(
'Routify: Unable to access context.\n' +
"If you're using Svelte 5, ensure $ helpers are accessed at the root level of your component.",
)
Expand Down

0 comments on commit cb5ff0d

Please sign in to comment.