Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Mar 30, 2021
1 parent 53c4c0a commit 9e0d4cb
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/packages/client/src/runtime/getPrismaClient.ts
Expand Up @@ -351,7 +351,7 @@ export function getPrismaClient(config: GetPrismaClientOptions): any {
if (!fs.existsSync(cwd)) {
cwd = config.dirname
}
const sqliteDatasourceOverrides =
const sqliteDatasourceOverrides: DatasourceOverwrite[] =
config.sqliteDatasourceOverrides?.map((d) => {
if (d.env) {
let urlFromEnv = process.env[d.env!]
Expand All @@ -366,14 +366,13 @@ export function getPrismaClient(config: GetPrismaClientOptions): any {
url: 'file:' + path.resolve(cwd, urlFromEnv),
}
}
} else if (d.url) {
const url = 'file:' + path.resolve(cwd, d.url)
return {
name: d.name,
url,
}
}
}, [] as DatasourceOverwrite[]) ?? []
const url = 'file:' + path.resolve(cwd, d.url!)
return {
name: d.name,
url,
}
}) ?? []

const thedatasources = options.datasources || {}
const inputDatasources = Object.entries(thedatasources)
Expand Down

0 comments on commit 9e0d4cb

Please sign in to comment.