mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-24 07:30:12 +01:00
Fixed Flow errors temporarily
This commit is contained in:
parent
00911b7350
commit
6703454356
@ -50,11 +50,16 @@ const truncate = (string, n) => {
|
|||||||
/**
|
/**
|
||||||
* Return the meta tag value for the given key
|
* Return the meta tag value for the given key
|
||||||
*
|
*
|
||||||
* @param {String} key - Meta name
|
* @param {string} key - Meta name
|
||||||
* @return {String} Meta content value
|
* @param {string} [_] - Stop Flow complaining (TODO)
|
||||||
|
*
|
||||||
|
* @return {string} Meta content value
|
||||||
*/
|
*/
|
||||||
const i18n = key => {
|
const i18n = (key, _) => { // eslint-disable-line no-unused-vars
|
||||||
return document.querySelector(`[name=i18n-${key}]`).content
|
const meta = document.querySelector(`[name=i18n-${key}]`)
|
||||||
|
if (!(meta instanceof HTMLMetaElement))
|
||||||
|
throw new ReferenceError
|
||||||
|
return meta.content
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------------
|
/* ----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user