Skip to content

Commit

Permalink
Update format.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
daoauth committed Dec 1, 2024
1 parent 8c59e3f commit 9ec1b5a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utilities/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const loadProjectPrettierConfig = async (
try {
const workspaceFolder = vscode.workspace.workspaceFolders?.[0];
if (!workspaceFolder) {
return Default;
return {};
}
const prettierConfigPath = vscode.Uri.joinPath(
workspaceFolder.uri,
Expand All @@ -64,8 +64,7 @@ const loadProjectPrettierConfig = async (
const config = JSON.parse(document.getText());
return config ? { ...Default, ...config } : Default;
} catch (error) {
vscode.window.showErrorMessage(`Error loading .prettierrc: ${error}`);
return Default;
return {};
}
};

Expand Down

0 comments on commit 9ec1b5a

Please sign in to comment.