mirror of https://github.com/zulip/zulip.git
node tests: Avoid re-compiling templates.
This is a minor optimization to avoid re-compiling templates that have already encountered.
This commit is contained in:
parent
dd4a8eeebd
commit
0085164ad9
|
@ -40,6 +40,11 @@ exports.use_template = function (name) {
|
|||
Handlebars.templates = {};
|
||||
}
|
||||
|
||||
if (_.has(Handlebars.template, name)) {
|
||||
// we already compile the template
|
||||
return;
|
||||
}
|
||||
|
||||
var flag = false,
|
||||
counter = 0,
|
||||
data;
|
||||
|
|
Loading…
Reference in New Issue