Skip to content

Commit

Permalink
revert: fix EditorView.update errors (#280).
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 28, 2022
1 parent 6bdc5c8 commit cb5883d
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/useCodeMirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,6 @@ export function useCodeMirror(props: UseCodeMirror) {
getExtensions.unshift(keymap.of([indentWithTab]));
}
if (defaultBasicSetup) {
if (Array.isArray(basicSetup)) {
/**
* 🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
* This is not a solution.
* https://github.com/uiwjs/react-codemirror/issues/280
*/
basicSetup.map((item) => {
if (item.value && Array.isArray(item.value)) {
item.value = item.value
.map((keymap: any) => {
if ('Mod-f' === keymap.key) {
return undefined;
}
return keymap;
})
.filter(Boolean);
}
return item;
});
}
getExtensions.unshift(basicSetup);
}

Expand Down

0 comments on commit cb5883d

Please sign in to comment.