diff --git a/packages/vue-i18n-core/src/directive.ts b/packages/vue-i18n-core/src/directive.ts index 0f346f09d..bb497bdce 100644 --- a/packages/vue-i18n-core/src/directive.ts +++ b/packages/vue-i18n-core/src/directive.ts @@ -91,13 +91,13 @@ export type TranslationDirective = ObjectDirective * @deprecated will be removed at vue-i18n v12 */ export function vTDirective(i18n: I18n): TranslationDirective { - 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.$) {