From: Mike Taylor Date: Thu, 23 Jan 2014 14:49:07 +0000 (+0000) Subject: loadTemplate() guards its own body, so invocations don't have to. X-Git-Tag: 1.0.0~1653 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=50e99f7a3b5e3729395f4264d3602d9b28987bee;p=mkws-moved-to-github.git loadTemplate() guards its own body, so invocations don't have to. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 9f17d0b..05ba2a7 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -787,6 +787,9 @@ function _make_mkws_team($, teamName) { function loadTemplate(name) { + if (mkws['template' + name]) + return; // It's already been done + var source = $("#mkwsTemplate" + name).html(); if (!source) { source = defaultTemplate(name);