In my angular project I have a double list. The second depends on the choice of the first. Except that in the onChange method when it enters the if it gives me an error and