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