Skip to content

Commit

Permalink
Merge pull request #260 from huumanoid/fix-undefined-is-not-a-function
Browse files Browse the repository at this point in the history
Fix NodeList to Array convertion
  • Loading branch information
wwayne authored Feb 17, 2017
2 parents c4a4f87 + f731209 commit 661a384
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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)
}

/**
Expand Down

0 comments on commit 661a384

Please sign in to comment.