Skip to content

Commit b8ca2c5

Browse files
Merge pull request #1807 from payloadcms/fix/code-editor-theme-flicker
fix: theme flicker on code editor
2 parents 06fd7e7 + c9e7c1b commit b8ca2c5

File tree

1 file changed

+1
-1
lines changed
  • src/admin/components/elements/CodeEditor

1 file changed

+1
-1
lines changed

src/admin/components/elements/CodeEditor/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const CodeEditor: React.FC<Props> = (props) => {
2222
<Editor
2323
height="35vh"
2424
className={classes}
25+
theme={theme === 'dark' ? 'vs-dark' : 'vs'}
2526
options={
2627
{
2728
detectIndentation: true,
@@ -31,7 +32,6 @@ const CodeEditor: React.FC<Props> = (props) => {
3132
readOnly: Boolean(readOnly),
3233
scrollBeyondLastLine: false,
3334
tabSize: 2,
34-
theme: theme === 'dark' ? 'vs-dark' : 'vs',
3535
wordWrap: 'on',
3636
...options,
3737
}

0 commit comments

Comments
 (0)