Skip to content

Commit

Permalink
fix "continue without saving work" button (hackclub#2230)
Browse files Browse the repository at this point in the history
* fix wrong disabled conditions for login page- fixes hackclub#2209

* don't run useEffect if openEditor.value == null

* Update draft-warning.tsx
  • Loading branch information
recursiveforte authored Aug 26, 2024
1 parent 7e3a941 commit df3234d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/popups-etc/editor-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export default function EditorModal() {
useEffect(() => {
// just do this to sync the editor text with the code mirror text

if (!openEditor.value) return;

const code = codeMirror.value?.state.doc.toString() ?? '';
const levenshtainDistances = _foldRanges.value.map((foldRange, foldRangeIndex) => {
const widgetKind = _widgets.value[foldRangeIndex]?.value.spec.widget.props.kind;
Expand Down

0 comments on commit df3234d

Please sign in to comment.