|
@@ -1549,7 +1549,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
|
|
|
|
|
static async evalTemplateVariable(template, variableName, valueGetter, dontReplaceSlash) {
|
|
static async evalTemplateVariable(template, variableName, valueGetter, dontReplaceSlash) {
|
|
|
const replaceRegExp = new RegExp("{\\s*" + variableName + "\\s*}", "g");
|
|
const replaceRegExp = new RegExp("{\\s*" + variableName + "\\s*}", "g");
|
|
|
- if (template.match(replaceRegExp)) {
|
|
|
|
|
|
|
+ if (template && template.match(replaceRegExp)) {
|
|
|
let value = await valueGetter();
|
|
let value = await valueGetter();
|
|
|
if (!dontReplaceSlash) {
|
|
if (!dontReplaceSlash) {
|
|
|
value = value.replace(/\/+/g, "_");
|
|
value = value.replace(/\/+/g, "_");
|