Shouldn't there be an additional null check?

  o = rowIndicators[columnIndex];
  if (o != null && o.parent)
    o.parent.removeChild(o);


On Thu, Sep 12, 2013 at 10:34 AM, Erik de Bruin <e...@ixsoftware.nl> wrote:

> I'd go with:
>
> var rowIndicators:Object = cellSelectionIndicators[rowData.uid];
> if (rowIndicators && rowIndicators[columnIndex])
> {
>   o = rowIndicators[columnIndex];
>   if (o.parent)
>     o.parent.removeChild(o);
>
>   delete rowIndicators[columnIndex];
>   if (!atLeastOneProperty(rowIndicators))
>     delete cellSelectionIndicators[rowData.uid];
> }
>
> No need for the extra local variable, it seems.
>
> EdB
>
>
>
> On Thu, Sep 12, 2013 at 10:27 AM, Justin Mclean
> <jus...@classsoftware.com> wrote:
> > Hi,
> >
> > Looks much better.
> >
> > Justin
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

Reply via email to