Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / handlebars / lib / handlebars / helpers / helper-missing.js
1 import Exception from '../exception';
2
3 export default function(instance) {
4   instance.registerHelper('helperMissing', function(/* [args, ]options */) {
5     if (arguments.length === 1) {
6       // A missing field in a {{foo}} construct.
7       return undefined;
8     } else {
9       // Someone is actually trying to call something, blow up.
10       throw new Exception('Missing helper: "' + arguments[arguments.length - 1].name + '"');
11     }
12   });
13 }