|
|
@ -19,8 +19,9 @@
|
|
|
|
function onRequest(context) {
|
|
|
|
function onRequest(context) {
|
|
|
|
var utility = require("/app/modules/utility.js").utility;
|
|
|
|
var utility = require("/app/modules/utility.js").utility;
|
|
|
|
context.handlebars.registerHelper('equal', function (lvalue, rvalue, options) {
|
|
|
|
context.handlebars.registerHelper('equal', function (lvalue, rvalue, options) {
|
|
|
|
if (arguments.length < 3)
|
|
|
|
if (arguments.length < 3) {
|
|
|
|
throw new Error("Handlebars Helper equal needs 2 parameters");
|
|
|
|
throw new Error("Handlebars Helper equal needs 2 parameters");
|
|
|
|
|
|
|
|
}
|
|
|
|
if (lvalue != rvalue) {
|
|
|
|
if (lvalue != rvalue) {
|
|
|
|
return options.inverse(this);
|
|
|
|
return options.inverse(this);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|