title: ERROR TypeError: Cannot read properties of undefined (reading 'phones')
body: <p>I have a problem, I get the error &quot;core.js:4196 ERROR TypeError: Cannot read properties of undefined (reading 'phones')&quot;</p>
  <p>The thing is that it tells me that the array of objects that I am going through is empty, when checking a little and doing debugging, I realize that it is not. That actually does not come indefinitely, the data is something big, yes, among 2800 data it brings you almost 5 or 6 phones (since those are what are registered)</p>
  <p>Anyway, what I really want to do is get the phone numbers of &quot;x&quot; users from an object and do an autocomplete filtering the data.</p>
  <p>I leave you the code, maybe you see something that I don't:</p>
  <p><strong>.TS</strong></p>
  <pre><code>  contactos: AddContacto[] = [];
    filteredContacts: Observable&lt;AddContacto[]&gt;;
    phoneControl: FormControl = new FormControl();
  
   this.filteredContactos = this.phoneControl.valueChanges.pipe(
        startWith(null),
        map((search: string | null) =&gt; (search ? this._filterContactos(search) : this.contactos.slice())),
      );
  
  private _filterContactos(search: string) {
      const filterValue = search.toLowerCase();
      return this.contact.filter(
        (contact) =&gt;
          !!contact.phones.find((email) =&gt; contact.includes(search)) ||
          contact.fullName.toLowerCase().includes(filterValue),
      );
    }
  </code></pre>
  <p><strong>.HTML</strong></p>
  <pre><code>&lt;div class=&quot;containerTitle p-16&quot;&gt;
  
                  &lt;mat-form-field fxFlex=&quot;100&quot; class=&quot;mr-12&quot; appearance=&quot;outline&quot; fxFlex=&quot;100&quot;&gt;
                      &lt;mat-label&gt;Search Client&lt;/mat-label&gt;
                      &lt;input type=&quot;text&quot; placeholder=&quot;Add email...&quot; matInput [formControl]=&quot;phoneControl&quot; [matAutocomplete]=&quot;auto&quot;&gt;
                      &lt;mat-autocomplete #auto=&quot;matAutocomplete&quot; &gt;
                          &lt;mat-option *ngFor=&quot;contact of filteredContacts | async&quot; [value]=&quot;contact.phones[0]&quot;&gt;
                              {{contact?.phones[0]}} {{contact?.fullName ? '('+ contacto?.nombre_completo +')' : ''}}
                          &lt;/mat-option&gt;
                      &lt;/mat-autocomplete&gt;
                  &lt;/mat-form-field&gt;
                  &lt;small-loading class=&quot;loadingProgressBar&quot; [loading]=&quot;loading&quot;&gt;&lt;/small-loading&gt;
              &lt;/div&gt;
  </code></pre>
  <p><strong>Object</strong></p>
  <pre><code>0: {
      &quot;state&quot;: true,
      &quot;coments&quot;: null,
      &quot;phones&quot;: [&quot;22222222&quot;],
      &quot;emails&quot;: [
          &quot;email@gmail.com&quot;
      ],
      &quot;fullName&quot;: &quot;&quot;,
      &quot;_id&quot;: &quot;&quot;,
      &quot;bitacora&quot;: {},
      &quot;__v&quot;: 0
  }
  </code></pre>
  <p>Thanks!!</p>