Содержит не функция JavaScript

Try o.color.includes(this.color) instead.

"contains" is deprecated. You should use "includes" instead.
serhii.nahornyi