aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-06-26 23:55:06 -0400
committerGitHub <noreply@github.com>2021-06-26 23:55:06 -0400
commit6b8cd5e623132b0697d628cd793bafb0d0b86ae0 (patch)
tree28b3e740479079a70d8d45d0820f846310c6e543 /ext
parente7ba321eb9d79dcc4cdbf18659b6d55deeb165ce (diff)
Template patcher updates (#1766)
* Don't append anything if the additions is empty * Simplify update list
Diffstat (limited to 'ext')
-rw-r--r--ext/js/templates/template-patcher.js1
1 files changed, 1 insertions, 0 deletions
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) => {