Skip to content

Commit 3dd7d56

Browse files
authored
fix(language-server): adapter for prisma config changes (#1821)
`config.schema` is now `string | undefined` and not a union type.
1 parent 44202fe commit 3dd7d56

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/language-server/src/lib/Schema.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,7 @@ function loadPrismaSchemaWithConfig(
9999
currentDocument: TextDocument,
100100
allDocuments: TextDocuments<TextDocument>,
101101
): Promise<PrismaSchema> {
102-
const fsPath: string = config.schema ?
103-
config.schema.kind === 'single' ?
104-
config.schema.filePath :
105-
config.schema.folderPath :
106-
URI.parse(currentDocument.uri).fsPath
102+
const fsPath: string = config.schema ?? URI.parse(currentDocument.uri).fsPath
107103

108104
return loadPrismaSchema(fsPath, allDocuments)
109105
}

0 commit comments

Comments
 (0)