From cb5883d10117e0fe1307b67b4fa26fd100367000 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 28 Mar 2022 12:07:11 +0800 Subject: [PATCH] revert: fix EditorView.update errors (#280). --- src/useCodeMirror.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/useCodeMirror.ts b/src/useCodeMirror.ts index 15eb78b40..19801bbea 100644 --- a/src/useCodeMirror.ts +++ b/src/useCodeMirror.ts @@ -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); }