broadway-handlebars
Advanced tools
Comparing version 0.2.1 to 0.2.2
10
index.js
@@ -162,11 +162,15 @@ var _ = require('lodash'), | ||
var _render = function(view, data, callback) { | ||
var template = templateCache[view]; | ||
var template = templateCache[view], | ||
html = null, | ||
err = null; | ||
// render | ||
try { | ||
callback(null, template(data)); | ||
html = template(data); | ||
} | ||
catch (e) { | ||
callback('Error in view - ' + view + ': ' + (e.message) + '\n' + (e.stack || '')); | ||
err = 'Error in view - ' + view + ': ' + (e.message) + '\n' + (e.stack || ''); | ||
} | ||
return _.isFunction(callback) ? callback(err, html) : null; | ||
}; | ||
@@ -173,0 +177,0 @@ |
{ | ||
"name": "broadway-handlebars", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"main": "index", | ||
@@ -5,0 +5,0 @@ "description": "Plugin for flatiron/broadway for rendering with the handlebars view engine.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11023
283