Closed tnaffh closed 5 years ago
There's inconsistency in the API when it comes to default values supplied for the db parameter. Some methods supply a default value:
disconnect(db = databases[defaultDB])
others don't:
destroy(db)
Let me test a fix for this. I can't see a rationale for not supplying the default value of defaultDB for all methods but maybe one will come to me.
I think it's just inconsistency. I also see no reason to not always fall back to the defaultDB.
Hey @tnaffh. A new version 0.3.0 is released reworking this inconistency thanks to @assemblethis. So .info() should now work with the defaultDB if no params are given. See: https://github.com/MDSLKTR/pouch-vue/blob/master/src/index.js#L682
I closed this since the issue should be resolved in the new version. Please reopen if anything doesn't work as expected.
Calling
this.$pouch.info()
in my vue component givesme an errorError: Missing/invalid DB name
because I didnt specify the db name.My question is, is the db name not set when I did this bellow?
Do I have to specify the db name everytime I call
$pouch
? or am I missing something?