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 = {};
|
Handlebars.templates = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_.has(Handlebars.template, name)) {
|
||||||
|
// we already compile the template
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var flag = false,
|
var flag = false,
|
||||||
counter = 0,
|
counter = 0,
|
||||||
data;
|
data;
|
||||||
|
|
Loading…
Reference in New Issue