Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vue): Make sure Clerk object is available before accessing properties #4779

Conversation

wobsoriano
Copy link
Member

Description

This PR makes sure the Clerk object is available before accessing any properties inside composables. Right now we're skipping that and causing TypeErrors when trying to access properties like setActive before Clerk is available.

Resolves ECO-279

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented Dec 13, 2024

🦋 Changeset detected

Latest commit: e5a27a3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@clerk/vue Patch
@clerk/nuxt Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 10:07pm

@wobsoriano
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @wobsoriano - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 2.1.2-snapshot.v20241213221615
@clerk/backend 1.21.2-snapshot.v20241213221615
@clerk/chrome-extension 2.1.2-snapshot.v20241213221615
@clerk/clerk-js 5.42.1-snapshot.v20241213221615
@clerk/elements 0.22.2-snapshot.v20241213221615
@clerk/clerk-expo 2.6.1-snapshot.v20241213221615
@clerk/expo-passkeys 0.1.2-snapshot.v20241213221615
@clerk/express 1.3.29-snapshot.v20241213221615
@clerk/fastify 2.1.2-snapshot.v20241213221615
@clerk/localizations 3.9.2-snapshot.v20241213221615
@clerk/nextjs 6.9.2-snapshot.v20241213221615
@clerk/nuxt 0.1.2-snapshot.v20241213221615
@clerk/clerk-react 5.20.2-snapshot.v20241213221615
@clerk/react-router 0.1.2-snapshot.v20241213221615
@clerk/remix 4.4.2-snapshot.v20241213221615
@clerk/clerk-sdk-node 5.1.2-snapshot.v20241213221615
@clerk/shared 2.20.2-snapshot.v20241213221615
@clerk/tanstack-start 0.8.2-snapshot.v20241213221615
@clerk/testing 1.4.2-snapshot.v20241213221615
@clerk/themes 2.2.2-snapshot.v20241213221615
@clerk/types 4.39.4-snapshot.v20241213221615
@clerk/ui 0.3.2-snapshot.v20241213221615
@clerk/vue 0.1.2-snapshot.v20241213221615

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/expo-passkeys

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/nuxt

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/react-router

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@clerk/ui

npm i @clerk/[email protected] --save-exact

@clerk/vue

npm i @clerk/[email protected] --save-exact

@wobsoriano wobsoriano marked this pull request as ready for review December 13, 2024 22:24
@wobsoriano wobsoriano merged commit dfdf23b into main Dec 14, 2024
29 checks passed
@wobsoriano wobsoriano deleted the rob/eco-279-make-sure-clerk-object-is-available-before-accessing branch December 14, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants