New line at the end of branch logic breaks the branch during runtime

When there’s a new line at the end of a branch formula it seems to break the branch merge functionality during runtime. The error I’m getting is:

Uncaught TypeError: Cannot read property ‘merges’ of null

Reproduce:

add a return character to the end of a branch formula

Also, you can copy this xml and press Query Opp to get the error.
Remove the new line at the end of the formula to get rid of the error.

I’m running Brooklyn Iteration 4.


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">    <models>
        <model id="UI" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
            <fields>
                <field id="conditionCheckbox" displaytype="BOOLEAN" ogdisplaytype="TEXT" defaultvaluetype="fieldvalue" defaultValue="true" label="conditionCheckbox"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="Opp" limit="20" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="Opportunity">
            <fields>
                <field id="Name"/>
            </fields>
            <conditions/>
            <actions>
                <action>
                    <actions>
                        <action type="branch" model="UI" label="to get this condition to work remove the new line at the end of the formula">
                            <formula>{{$Model.UI.data.0.conditionCheckbox}}==true
</formula>
                            <iftrueactions>
                                <action type="blockUI" message="Branch body reached!" timeout="2000"/>
                            </iftrueactions>
                        </action>
                    </actions>
                    <events>
                        <event>models.loaded</event>
                    </events>
                </action>
            </actions>
        </model>
    </models>
    <components>
        <buttonset model="Opp" uniqueid="sk-Uxerc-236">
            <buttons>
                <button type="multi" label="Query Opp">
                    <actions>
                        <action type="requeryModels" behavior="standard">
                            <models>
                                <model>Opp</model>
                            </models>
                        </action>
                    </actions>
                </button>
            </buttons>
        </buttonset>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>

Shmuel,

Thanks for the repro page! Our developers are now aware of this issue and we’ll let you know when a future release fixes this issue.

We’ve confirmed that this is a bug for server-processed models. If you need a temporary workaround, check the “Process client-side” option on the model’s “Advanced” tab.

Thank you for your patience as we addressed this bug. This issue has been resolved in the Brooklyn Update 1 - Iteration 2 and Brooklyn - Iteration 6 releases which are now available from the Skuid Releases page

As a reminder, Salesforce does NOT allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade.

Thanks!