title: .includes() with .filter() in vue.js
body: <p>So I'm trying to make a filtering method inside vue and one of the rules it has is to filter objects that their company id is in a the filtering list.</p>
  <p>So basically the user can select multiple companies and vue will create a list for example <code>[1,5,2,6]</code> then this list gets parsed to the <code>processFilter()</code> method and it is supposed to now filter the products array to only have the products that their <code>company id</code> is in the list created by vue.</p>
  <p>Product array example:</p>
  <pre><code>[
                  {
                  'id': 1,
                  'name': 'Prod1',
                  'min_price': '1',
                  'max_price': '2',
                  'currency': 'EUR',
                  'image': '&lt;Some_big_url&gt;',
                  'company': '1',
                  'sub_category': '2',
                  'created': '&lt;some_big_date&gt;',
                  'views': '10000'
                  }
              ]
  </code></pre>
  <p>My processFilter method:</p>
  <pre><code>processFilter() {
        const subCategory = this.filtersSub;
        const company = this.filtersComp;
        const sortBy = this.filtersSort;
        this.filtered = this.products.filter(
          this.data.includes(subCategory) &amp;&amp; this.data.includes(company)
        );
      },
  </code></pre>
  <p>After testing this function method it returns the following in the console:</p>
  <pre><code>vue.runtime.esm.js:1888 TypeError: Cannot read property 'includes' of undefined
      at a.processFilter (category.vue:227)
      at submit (category.vue?c00e:1)
      at ne (vue.runtime.esm.js:1854)
      at HTMLFormElement.n (vue.runtime.esm.js:2179)
      at HTMLFormElement.Ji.o._wrapper (vue.runtime.esm.js:6917)
  </code></pre>
  <p>Is there a way to make this work or should I do it in a different way?</p>
  <p>Before anyone asks yes I <code>console.log() company and this.filtersComp</code> and yes they are not <code>undefined</code> and have values in them as you can see in the following image:</p>
  <p><a href="https://i.stack.imgur.com/XjDjH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XjDjH.png" alt="enter image description here" /></a></p>