diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..528c6b25 --- /dev/null +++ b/.npmignore @@ -0,0 +1,11 @@ +.*rc +.eslintignore +.csscomb.json +.*.yml +.editorconfig +karma.conf.js +server.js +tests.webpack.js +webpack.config.* +docs +spec diff --git a/components/autocomplete/Autocomplete.jsx b/components/autocomplete/Autocomplete.jsx index 6ddd0af9..11a6248e 100644 --- a/components/autocomplete/Autocomplete.jsx +++ b/components/autocomplete/Autocomplete.jsx @@ -113,7 +113,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]]));