Added check for falsey adapter in registerAdapter
This commit is contained in:
parent
cd700f94ab
commit
d97c12cd3f
@ -21,6 +21,10 @@ export default {
|
|||||||
return adapter.delete(dbName);
|
return adapter.delete(dbName);
|
||||||
},
|
},
|
||||||
registerAdapter: function(adapter) {
|
registerAdapter: function(adapter) {
|
||||||
|
if (!adapter) {
|
||||||
|
throw new PawSQLiteError("Invalid adapter");
|
||||||
|
}
|
||||||
|
|
||||||
const wrapped = wrapAdapter(adapter);
|
const wrapped = wrapAdapter(adapter);
|
||||||
|
|
||||||
if (getAdapter(wrapped.name, true)) {
|
if (getAdapter(wrapped.name, true)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user