These just check the predicate first:

// for [section foo]
function _DoSection(args, context, callback) {
        var block = args;
        var do_section=_DoPredicate(block, context);
        var value = context.PushSection(block.section_name);

        if (do_section) {

        ...
}


function _DoRepeatedSection(args, context, callback) {
        var block = args;
        var do_section=_DoPredicate(block, context);
        var pushed;

        ...

        if (do_section && items && items.length > 0) {

        ...
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JSON 
Template" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/json-template?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to