Blob Blame History Raw
From 108e1402c4ac5d8893ae04ce01d42d137de00b0d Mon Sep 17 00:00:00 2001
From: "T.C. Hollingsworth" <tchollingsworth@gmail.com>
Date: Sat, 31 May 2014 00:48:44 -0700
Subject: [PATCH] extend _.templateSettings instead of overriding it

This resolves "_ is not defined" errors when using templates.

See also: https://github.com/lodash/lodash/issues/484
---
 lib/grunt/template.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/grunt/template.js b/lib/grunt/template.js
index 5cdc981..ac5f5ea 100644
--- a/lib/grunt/template.js
+++ b/lib/grunt/template.js
@@ -51,7 +51,7 @@ template.setDelimiters = function(name) {
   // Get the appropriate delimiters.
   var delimiters = allDelimiters[name in allDelimiters ? name : 'config'];
   // Tell Lo-Dash which delimiters to use.
-  grunt.util._.templateSettings = delimiters.lodash;
+  grunt.util._.extend(grunt.util._.templateSettings, delimiters.lodash);
   // Return the delimiters.
   return delimiters;
 };
-- 
1.9.0