mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	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:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user