Try o.color.includes(this.color) instead. "contains" is deprecated. You should use "includes" instead.
const age = 23; const result = age.toString().includes('2'); console.log(result); // true