From 1fdf2d31ac1d6845af7522e4263a899a9344cca3 Mon Sep 17 00:00:00 2001 From: Jason Quense Date: Fri, 20 Jan 2017 15:05:37 -0500 Subject: [PATCH] simpler check --- src/TransitionGroup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TransitionGroup.js b/src/TransitionGroup.js index 0a962487..775f6268 100644 --- a/src/TransitionGroup.js +++ b/src/TransitionGroup.js @@ -189,8 +189,8 @@ class TransitionGroup extends React.Component { for (let key in this.state.children) { let child = this.state.children[key]; if (child) { - let isCallbackRef = typeof child.ref === 'function'; - warning(!child.ref || isCallbackRef, + let isCallbackRef = typeof child.ref !== 'string'; + warning(isCallbackRef, 'string refs are not supported on children of TransitionGroup and will be ignored. ' + 'Please use a callback ref instead: https://facebook.github.io/react/docs/refs-and-the-dom.html#the-ref-callback-attribute');