mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-25 03:10:33 +03:00
refactor: make hasMetaInfo default export
This commit is contained in:
committed by
Alexander Lichter
parent
f2e8eb537d
commit
cd98210acb
+1
-1
@@ -3,7 +3,7 @@ import createMixin from './shared/mixin'
|
|||||||
import setOptions from './shared/options'
|
import setOptions from './shared/options'
|
||||||
import { isUndefined } from './shared/typeof'
|
import { isUndefined } from './shared/typeof'
|
||||||
import $meta from './client/$meta'
|
import $meta from './client/$meta'
|
||||||
import { hasMetaInfo } from './shared/hasMetaInfo'
|
import hasMetaInfo from './shared/hasMetaInfo'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin install function.
|
* Plugin install function.
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import { version } from '../package.json'
|
|||||||
import createMixin from './shared/mixin'
|
import createMixin from './shared/mixin'
|
||||||
import setOptions from './shared/options'
|
import setOptions from './shared/options'
|
||||||
import $meta from './server/$meta'
|
import $meta from './server/$meta'
|
||||||
import { hasMetaInfo } from './shared/hasMetaInfo'
|
import hasMetaInfo from './shared/hasMetaInfo'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin install function.
|
* Plugin install function.
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
export function hasMetaInfo(vm = this) {
|
import { isObject } from './typeof'
|
||||||
return vm && !!vm._vueMeta
|
|
||||||
|
// Vue $root instance has a _vueMeta object property, otherwise its a boolean true
|
||||||
|
export default function hasMetaInfo(vm = this) {
|
||||||
|
return vm && (vm._vueMeta === true || isObject(vm._vueMeta))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user