Skip to content

Commit

Permalink
fix: allow custom toString methods on objects (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
samdenty authored and Kent C. Dodds committed Jun 22, 2018
1 parent e762248 commit aae25fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/downshift.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Downshift extends Component {
if (i == null) {
return ''
}
if (process.env.NODE_ENV !== 'production' && isPlainObject(i)) {
if (process.env.NODE_ENV !== 'production' && isPlainObject(i) && !i.hasOwnProperty('toString')) {
//eslint-disable-next-line no-console
console.warn(
'downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.',
Expand Down

0 comments on commit aae25fa

Please sign in to comment.