We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e673cd commit 7da8734Copy full SHA for 7da8734
tasks/handlebars.js
@@ -207,7 +207,12 @@ module.exports = function(grunt) {
207
if (useNamespace) {
208
// Namespace has not been explicitly set to false; the AMD
209
// wrapper will return the object containing the template.
210
- output.push('return ' + extractGlobalNamespace(nsDeclarations) + ';');
+
211
+ // if namespace is a function iterating over file for search global/root namespace
212
+ // instead find the declared namespace formatted and allowing namespace with dots
213
+ var namespace = _.isFunction(options.namespace) ?
214
+ extractGlobalNamespace(nsDeclarations) : getNamespaceInfo().namespace;
215
+ output.push('return ' + namespace + ';');
216
}
217
output.push('});');
218
0 commit comments