Acknowledged
CIQQA-4100

Array.removeAll() does not accept null despite documentation

According to the documentation, Array.removeAll() should accept null as a parameter, although its exact behavior in that case is not specified. One might expect it to remove all entries.

However, the compiler does not accept null as a valid argument. I will attach a screenshot in a follow-up post to illustrate the issue.

Parents
  • You've declared an array (implicitly or explicitly), to be Array<EvccWidgetBaseSiteView>, so it should never have a null value in it. If it is not possible to have a null in the collection, it does not make sense to remove a null value.

    Understand, thank you for the clarification and for taking the time to outline alternative ways to clear the array. I do need to keep the reference intact, so I will go with the second, more efficient code sample you suggested.

Comment
  • You've declared an array (implicitly or explicitly), to be Array<EvccWidgetBaseSiteView>, so it should never have a null value in it. If it is not possible to have a null in the collection, it does not make sense to remove a null value.

    Understand, thank you for the clarification and for taking the time to outline alternative ways to clear the array. I do need to keep the reference intact, so I will go with the second, more efficient code sample you suggested.

Children
No Data