alexurquhart / vue-bootstrap-typeahead

An autocomplete/typeahead component for Vue 2 and Bootstrap 4
https://alexurquhart.github.io/vue-bootstrap-typeahead/
MIT License
206 stars 157 forks source link

Error in render when v-model is null #18

Closed Meshz closed 5 years ago

Meshz commented 6 years ago

Hello,

Several errors are showing up when the v-model of the component is equal to null. For now I can avoid this value but I thought you should be aware of.

[Vue warn]: Error in render: "TypeError: Cannot read property 'length' of null" found in <VueBootstrapTypeaheadList> at vue-bootstrap-typeahead/src/components/VueBootstrapTypeaheadList.vue TypeError: Cannot read property 'length' of null at VueComponent.matchedItems [Vue warn]: Error in mounted hook: "TypeError: Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'." found in <VueBootstrapTypehead> at vue-bootstrap-typeahead/src/components/VueBootstrapTypeahead.vue TypeError: Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element' at VueComponent.mounted Uncaught TypeError: Cannot set property 'width' of undefined at VueComponent.resizeList

alexurquhart commented 5 years ago

Thanks!

Just pushed a patch, should be fixed now

stefandunn commented 5 years ago

I still encounter this on 0.2.6. Has the npm package been updated with this fix?