Set dashboard time when not present in preamble

pull/5162/head
Brandon Farmer 2019-04-23 14:39:39 -07:00
parent b94a91672b
commit 1f8241350d
1 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,10 @@ export const renderTemplatesInScript = async (
const {imports, body} = await extractImports(astLink, script)
if (body.match(UPPER_DASHBOARD_TIME) || body.match(DASHBOARD_TIME)) {
if (
body.match(`${UPPER_DASHBOARD_TIME} =`) ||
body.match(`${DASHBOARD_TIME} =`)
) {
return `${imports}\n${body}`
}