mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-25 08:40:34 +03:00
chore: fix lint
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import { booleanHtmlAttributes } from '../../shared/constants'
|
import { booleanHtmlAttributes } from '../../shared/constants'
|
||||||
import { isUndefined } from '../../utils/is-type'
|
|
||||||
import { toArray, includes } from '../../utils/array'
|
import { toArray, includes } from '../../utils/array'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { booleanHtmlAttributes, tagsWithoutEndTag, tagsWithInnerContent, tagAttributeAsInnerContent } from '../../shared/constants'
|
import { booleanHtmlAttributes, tagsWithoutEndTag, tagsWithInnerContent, tagAttributeAsInnerContent } from '../../shared/constants'
|
||||||
import { isUndefined } from '../../utils/is-type'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates meta, base, link, style, script, noscript tags for use on the server
|
* Generates meta, base, link, style, script, noscript tags for use on the server
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ export const serverSequences = [
|
|||||||
|
|
||||||
export const clientSequences = [
|
export const clientSequences = [
|
||||||
[/&/g, '\u0026'],
|
[/&/g, '\u0026'],
|
||||||
[/</g, '\u003c'],
|
[/</g, '\u003C'],
|
||||||
[/>/g, '\u003e'],
|
[/>/g, '\u003E'],
|
||||||
[/"/g, '\u0022'],
|
[/"/g, '\u0022'],
|
||||||
[/'/g, '\u0027']
|
[/'/g, '\u0027']
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ export default class Browser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async close () {
|
async close () {
|
||||||
if (!this.browser) return
|
if (!this.browser) { return }
|
||||||
await this.browser.close()
|
await this.browser.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
async page (url, globalName = 'vueMeta') {
|
async page (url, globalName = 'vueMeta') {
|
||||||
if (!this.browser) throw new Error('Please call start() before page(url)')
|
if (!this.browser) { throw new Error('Please call start() before page(url)') }
|
||||||
const page = await this.browser.newPage()
|
const page = await this.browser.newPage()
|
||||||
|
|
||||||
// pass on console messages
|
// pass on console messages
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default class ChromeDetector {
|
|||||||
detect (platform = this.platform) {
|
detect (platform = this.platform) {
|
||||||
const handler = this[platform]
|
const handler = this[platform]
|
||||||
if (typeof handler !== 'function') {
|
if (typeof handler !== 'function') {
|
||||||
throw new Error(`${platform} is not supported.`)
|
throw new TypeError(`${platform} is not supported.`)
|
||||||
}
|
}
|
||||||
return this[platform]()[0]
|
return this[platform]()[0]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user