keeweb/app/scripts/hbs-helpers/ifemptyoreq.js

6 lines
196 B
JavaScript
Raw Normal View History

2019-09-15 14:16:32 +02:00
import Handlebars from 'hbs';
2015-12-16 22:50:45 +01:00
Handlebars.registerHelper('ifemptyoreq', function(lvalue, rvalue, options) {
return !lvalue || lvalue === rvalue ? options.fn(this) : options.inverse(this);
});