We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4a4f87 commit 0a57e5eCopy full SHA for 0a57e5e
src/index.js
@@ -16,6 +16,8 @@ import getPosition from './utils/getPosition'
16
import getTipContent from './utils/getTipContent'
17
import { parseAria } from './utils/aria'
18
19
+import createArrayFromMixed from 'fbjs/lib/createArrayFromMixed'
20
+
21
/* CSS */
22
import cssStyle from './style'
23
@@ -153,11 +155,7 @@ class ReactTooltip extends Component {
153
155
targetArray = document.querySelectorAll(`[data-tip][data-for="${id}"]`)
154
156
}
157
- // targetArray is a NodeList, convert it to a real array
- // I hope I can use Object.values...
158
- return Object.getOwnPropertyNames(targetArray).map(key => {
159
- return targetArray[key]
160
- })
+ return createArrayFromMixed(targetArray)
161
162
163
/**
0 commit comments