Skip to content

Commit eae5751

Browse files
committed
junk: tmp
1 parent af046a6 commit eae5751

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/code-editor/index.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export default function CodeEditor(props) {
3333
const [_, setEditor] = useState(null);
3434

3535
useEffect(() => {
36-
if (editor.current && (!props.baseExampleSlug || !props.value)) return;
36+
console.log('editor code:\n', props.value);
37+
if (editor.current && !props.baseExampleSlug) return;
3738
if (editor.current) editor.current.destroy();
3839

3940
const theme = EditorView.theme({}, { dark: true });
@@ -66,7 +67,7 @@ export default function CodeEditor(props) {
6667
});
6768

6869
setEditor(editor.current);
69-
}, [props.value, props.baseExampleSlug]);
70+
}, [props.baseExampleSlug]);
7071

7172
useEffect(() => (
7273
() => {

0 commit comments

Comments
 (0)