Skip to content

Commit 13d1b93

Browse files
committed
fix: Error: Unsupported db type: function
1 parent 5f41031 commit 13d1b93

File tree

1 file changed

+3
-2
lines changed
  • packages/cubejs-server-core/core

1 file changed

+3
-2
lines changed

packages/cubejs-server-core/core/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ class CubejsServerCore {
171171
constructor(options) {
172172
options = options || {};
173173
options = {
174-
driverFactory: () => CubejsServerCore.createDriver(options.dbType),
175-
dialectFactory: () => CubejsServerCore.lookupDriverClass(options.dbType).dialectClass &&
174+
driverFactory: () => typeof options.dbType === 'string' && CubejsServerCore.createDriver(options.dbType),
175+
dialectFactory: () => typeof options.dbType === 'string' &&
176+
CubejsServerCore.lookupDriverClass(options.dbType).dialectClass &&
176177
CubejsServerCore.lookupDriverClass(options.dbType).dialectClass(),
177178
externalDriverFactory: process.env.CUBEJS_EXT_DB_TYPE && (
178179
() => CubejsServerCore.lookupDriverClass(process.env.CUBEJS_DB_EXT_TYPE)({

0 commit comments

Comments
 (0)