diff --git a/src/index.js b/src/index.js index 9e2a41b30..8c77f7d59 100644 --- a/src/index.js +++ b/src/index.js @@ -16,6 +16,8 @@ import getPosition from './utils/getPosition' import getTipContent from './utils/getTipContent' import { parseAria } from './utils/aria' +import createArrayFromMixed from 'fbjs/lib/createArrayFromMixed' + /* CSS */ import cssStyle from './style' @@ -154,10 +156,7 @@ class ReactTooltip extends Component { } // targetArray is a NodeList, convert it to a real array - // I hope I can use Object.values... - return Object.getOwnPropertyNames(targetArray).map(key => { - return targetArray[key] - }) + return createArrayFromMixed(targetArray) } /**