Project

Contents

Issue #00005422

WGA object unusable in CollectionResult filter
Bug

If you use the global object WGA inside a filter function you most likely will get a NullPointerException.

Sample:

<tml:script>
    _docs = WGA.nav("name:home").siblings().filter(function(doc){
        WGA.isIsolated()
        return true;
    })
</tml:script>
<tml:foreach item="_docs">...</tml:foreach>

The call to WGA.isIsolated() (as most other methods of the WGA object) leads to the NPE.

The reason was that the WGA object is not correctly initialised in this situations. This now has been corrected.