From 726a7772eec76058188580bd09367d601058d7a0 Mon Sep 17 00:00:00 2001 From: Miguel Ping Date: Tue, 24 Nov 2015 12:59:19 +0000 Subject: [PATCH] Fix array check on autocomplete --- components/autocomplete/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/autocomplete/index.jsx b/components/autocomplete/index.jsx index 604c20f2..b5aac903 100644 --- a/components/autocomplete/index.jsx +++ b/components/autocomplete/index.jsx @@ -112,7 +112,7 @@ class Autocomplete extends React.Component { source () { const { source } = this.props; - if (source.hasOwnProperty(length)) { + if (source.hasOwnProperty('length')) { return new Map(source.map((item) => [item, item])); } else { return new Map(Object.keys(source).map((key) => [key, source[key]]));