Skip to content

Commit

Permalink
Revert "improvement: $i18n property deinition for vue-i18n-bridge (#1394
Browse files Browse the repository at this point in the history
)" (#1396)

This reverts commit a1bc51b.
  • Loading branch information
kazupon committed Oct 1, 2021
1 parent 990944b commit 283210f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/extend.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/* @flow */

export default function extend (Vue: any, bridge: boolean = false): void {
/**
* if `bridge` mode is avialable, `$i18n` is defined at `vue-i18n-bridge`
*/
if (!bridge && !Vue.prototype.hasOwnProperty('$i18n')) {
export default function extend (Vue: any): void {
if (!Vue.prototype.hasOwnProperty('$i18n')) {
// $FlowFixMe
Object.defineProperty(Vue.prototype, '$i18n', {
get () { return this._i18n }
Expand Down
2 changes: 1 addition & 1 deletion src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function install (_Vue, options = { bridge: false }) {
return
}

extend(Vue, options.bridge)
extend(Vue)
Vue.mixin(defineMixin(options.bridge))
Vue.directive('t', { bind, update, unbind })
Vue.component(interpolationComponent.name, interpolationComponent)
Expand Down

0 comments on commit 283210f

Please sign in to comment.