From 6b8cd5e623132b0697d628cd793bafb0d0b86ae0 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 26 Jun 2021 23:55:06 -0400 Subject: Template patcher updates (#1766) * Don't append anything if the additions is empty * Simplify update list --- ext/js/templates/template-patcher.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/js') diff --git a/ext/js/templates/template-patcher.js b/ext/js/templates/template-patcher.js index 57178957..5658ca8a 100644 --- a/ext/js/templates/template-patcher.js +++ b/ext/js/templates/template-patcher.js @@ -77,6 +77,7 @@ class TemplatePatcher { // Private _addFieldTemplatesBeforeEnd(template, addition) { + if (addition.length === 0) { return template; } const newline = '\n'; let replaced = false; template = template.replace(this._lookupMarkerPattern, (g0) => { -- cgit v1.2.3