2
0
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:
pimlie
2019-07-11 21:43:05 +02:00
parent 1d9072a3af
commit 56f6577e25
40 changed files with 105 additions and 107 deletions
-1
View File
@@ -1,5 +1,4 @@
import { booleanHtmlAttributes } from '../../shared/constants'
import { isUndefined } from '../../utils/is-type'
import { toArray, includes } from '../../utils/array'
/**
-1
View File
@@ -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
+2 -2
View File
@@ -12,8 +12,8 @@ export const serverSequences = [
export const clientSequences = [
[/&/g, '\u0026'],
[/</g, '\u003c'],
[/>/g, '\u003e'],
[/</g, '\u003C'],
[/>/g, '\u003E'],
[/"/g, '\u0022'],
[/'/g, '\u0027']
]
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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]
}