Jelajahi Sumber

set template to empty string by default

Gildas 7 tahun lalu
induk
melakukan
9d9992351f
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      lib/single-file/single-file-core.js

+ 1 - 1
lib/single-file/single-file-core.js

@@ -1049,7 +1049,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 	const SINGLE_FILE_VARIABLE_NAME_PREFIX = "--sf-img-";
 
 	class ProcessorHelper {
-		static async evalTemplate(template, options, content, dontReplaceSlash) {
+		static async evalTemplate(template = "", options, content, dontReplaceSlash) {
 			const date = new Date();
 			const url = docUtil.parseURL(options.url);
 			template = await Util.evalTemplateVariable(template, "page-title", () => options.title || "No title", dontReplaceSlash);