From 6665753a7a508887acd46102d5d23e4c3bcf552b Mon Sep 17 00:00:00 2001 From: Javi Velasco Date: Sun, 10 Apr 2016 22:31:28 +0200 Subject: [PATCH] Indentify Avatar by constructur in Chip --- components/chip/Chip.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/chip/Chip.js b/components/chip/Chip.js index 8e7e9f0c..27162a65 100644 --- a/components/chip/Chip.js +++ b/components/chip/Chip.js @@ -1,12 +1,13 @@ import React, {PropTypes} from 'react'; import ClassNames from 'classnames'; +import Avatar from '../avatar'; import style from './style'; const Chip = ({children, className, deletable, onDeleteClick, ...other}) => { let hasAvatar = false; if (React.Children.count(children)) { const firstChild = children[0]; - hasAvatar = firstChild && firstChild.type && firstChild.type.name === 'Avatar'; + hasAvatar = firstChild && firstChild.type && firstChild.type === Avatar; } const classes = ClassNames(style.chip, {