mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-10 10:22:25 +03:00
refactor: switch args for generate
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
import getMetaInfo from '../shared/getMetaInfo'
|
||||
import { defaultOptions } from '../shared/constants'
|
||||
import { serverSequences } from '../shared/escaping'
|
||||
import { setOptions } from '../shared/options'
|
||||
import generateServerInjector from './generateServerInjector'
|
||||
|
||||
export default function generate (options, rawInfo) {
|
||||
if (arguments.length === 1) {
|
||||
rawInfo = options
|
||||
options = defaultOptions
|
||||
}
|
||||
|
||||
export default function generate (rawInfo, options = {}) {
|
||||
const metaInfo = getMetaInfo(setOptions(options), rawInfo, serverSequences)
|
||||
return generateServerInjector(options, metaInfo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user