You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(arguments.Length!=1)thrownewHandlebarsException("The {{targetDataItemExists}} function requires only one argument.");
@@ -275,5 +277,73 @@ public static void RegisterHandleBarsHelpers()
275
277
thrownewHandlebarsException($"The {{targetDataItemExists}} helper reported a conversion error, and was unable to deserialize the context into a DataObjectMapping. The reported error is "+exception.Message);
if(arguments.Length!=1)thrownewHandlebarsException("The {{exists}} function must have a single argument, which must be a property of a data object mapping.");
thrownewHandlebarsException($"The {{{property}}} used is not supported by the exist function. Only multiActiveKey and targetDataItem are currently supported.");
330
+
}
331
+
332
+
if(outcome)
333
+
{
334
+
// Regular block
335
+
options.Template(output,context);
336
+
}
337
+
else
338
+
{
339
+
// Else block
340
+
options.Inverse(output,context);
341
+
}
342
+
}
343
+
catch(Exceptionexception)
344
+
{
345
+
thrownewHandlebarsException($"The exists helper using the property {{{property}}} reported a conversion error, and was unable to deserialize the context into a DataObjectMapping. The reported error is "+exception.Message);
0 commit comments