From 6c196b4a6e1c137a26ee712bad858d7b55652006 Mon Sep 17 00:00:00 2001 From: Devix Rootix Date: Sat, 28 Oct 2023 21:39:41 +0500 Subject: [PATCH] fix(useJwt)!: rename `jwt_decode` to `jwtDecode` Renamed `jwt_decode` to `jwtDecode` for compatibility with `jwt-decode` package's [latest release](https://github.com/auth0/jwt-decode/releases/tag/v4.0.0) Solves #3508 --- packages/integrations/useJwt/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integrations/useJwt/index.ts b/packages/integrations/useJwt/index.ts index 02e6c6c753c..fd5fb3e3457 100644 --- a/packages/integrations/useJwt/index.ts +++ b/packages/integrations/useJwt/index.ts @@ -2,7 +2,7 @@ import type { ComputedRef } from 'vue-demi' import { computed } from 'vue-demi' import type { MaybeRefOrGetter } from '@vueuse/shared' import { toValue } from '@vueuse/shared' -import jwt_decode from 'jwt-decode' +import { jwtDecode } from 'jwt-decode' import type { JwtDecodeOptions, JwtHeader, JwtPayload } from 'jwt-decode' export interface UseJwtOptions { @@ -44,7 +44,7 @@ export function useJwt< const decodeWithFallback = (encodedJwt: string, options?: JwtDecodeOptions): T | Fallback => { try { - return jwt_decode(encodedJwt, options) + return jwtDecode(encodedJwt, options) } catch (err) { onError?.(err)