Skip to content

Commit

Permalink
refactor: format tryFormattingCode function parameters for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
JeelRajodiya committed Dec 21, 2024
1 parent 7cefd49 commit f50d6e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/client-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ export function hasNestedProperty(obj: any, path: string) {
// If we've made it through all the keys, the property exists
return true;
}
export async function tryFormattingCode(editorRef: any, setCodeString: (code:string) => void) {
export async function tryFormattingCode(
editorRef: any,
setCodeString: (code: string) => void,
) {
try {
if (!editorRef.current) return;
const currentCode = editorRef.current.getValue();
Expand All @@ -179,4 +182,4 @@ export async function tryFormattingCode(editorRef: any, setCodeString: (code:str
// If invalid JSON, do nothing
return;
}
}
}

0 comments on commit f50d6e2

Please sign in to comment.