buhrmi / vue-pouch

Live and reactive PouchDB bindings for Vuejs
164 stars 20 forks source link

Make $pouch api work with no options passed #12

Closed pbf closed 6 years ago

pbf commented 7 years ago

Currently, vue-pouch expects options argument to be provided and passes it to PouchDB. If no options were provided (not even an empty object), PouchDB receives explicit undefined and attempts to read options from it, resulting in error.

I believe vue-pouch should mimic PouchDB approach here and allow a call without options. I propose a change that may not be ideally clean - we're passing empty object even if caller doesn't - but retains simple syntax.

buhrmi commented 6 years ago

thanks for this