Skip to content

Commit

Permalink
fix: v-t custom directive warning when it will run (#2057)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon authored Dec 26, 2024
1 parent 101d28e commit 897516f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/vue-i18n-core/src/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ export type TranslationDirective<T = HTMLElement> = ObjectDirective<T>
* @deprecated will be removed at vue-i18n v12
*/
export function vTDirective(i18n: I18n): TranslationDirective<HTMLElement> {
if (__DEV__) {
warnOnce(
getWarnMessage(I18nWarnCodes.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE)
)
}

const _process = (binding: DirectiveBinding): [string, Composer] => {
if (__DEV__) {
warnOnce(
getWarnMessage(I18nWarnCodes.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE)
)
}

const { instance, value } = binding
/* istanbul ignore if */
if (!instance || !instance.$) {
Expand Down

0 comments on commit 897516f

Please sign in to comment.