Skip to content

Commit 9ee367a

Browse files
committed
Fix placeholder not disappearing in Monaco Editor
- Remove incorrect 'value || placeholder' logic - Monaco Editor now shows empty editor correctly - Placeholder only used in interface, not as fallback value
1 parent 70af8c5 commit 9ee367a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/components/CodeEditor.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export const CodeEditor: React.FC<CodeEditorProps> = ({
2222
theme,
2323
readOnly = false,
2424
language = 'javascript',
25-
placeholder = '',
2625
height = '400px'
2726
}) => {
2827
const handleEditorChange = (value: string | undefined) => {
@@ -35,7 +34,7 @@ export const CodeEditor: React.FC<CodeEditorProps> = ({
3534
<Editor
3635
height={height}
3736
defaultLanguage={language}
38-
value={value || placeholder}
37+
value={value}
3938
onChange={handleEditorChange}
4039
theme={editorTheme}
4140
options={{

0 commit comments

Comments
 (0)