Skip to content

Commit b31994d

Browse files
Merge pull request #5 from programmer-rahul/spaces-automatically-removed-in-code-editor
fix: Spaces Automatically Removed in Code Editor
2 parents 1303879 + 9b06ba4 commit b31994d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/components/project-screen/code-editor/code-area.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function CodeArea() {
1414

1515
// states
1616
const [currentFileContent, setCurrentFileContent] = useState<string | null>(
17-
null,
17+
null
1818
);
1919

2020
// handle current file content change
@@ -40,7 +40,7 @@ export default function CodeArea() {
4040
const { fileContent } = readFileContent({ fileId: selectedFile.id });
4141
setCurrentFileContent(fileContent);
4242
}
43-
}, [selectedFile, readFileContent]);
43+
}, [selectedFile]);
4444

4545
// if there is no opened tabs then set file content to null
4646
useEffect(() => {

0 commit comments

Comments
 (0)