Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
jiashengguo committed Apr 15, 2024
1 parent 6e9a04d commit 539107f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/schema/src/language-server/zmodel-formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ export class ZModelFormatter extends AbstractFormatter {
this.formatOptions = params.options;

this.configurationProvider.getConfiguration(ZModelLanguageMetaData.languageId, 'format').then((config) => {
if (config.usePrismaStyle === false) {
this.setPrismaStyle(false);
} else {
this.setPrismaStyle(true);
// in the CLI case, the config is undefined
if (config) {
if (config.usePrismaStyle === false) {
this.setPrismaStyle(false);
} else {
this.setPrismaStyle(true);
}
}
});

Expand Down

0 comments on commit 539107f

Please sign in to comment.