Try o.color.includes(this.color) instead. "contains" is deprecated. You should use "includes" instead.