@@ -87,9 +87,7 @@ export const CodeMirrorEditor = (props: Props): JSX.Element => {
const adjusted = adjustPasteData(strFromBol, textData);
- if (adjusted != null) {
- codeMirrorEditor?.replaceText(adjusted);
- }
+ codeMirrorEditor?.replaceText(adjusted);
}
};
@@ -15,7 +15,7 @@ export const getStrFromBol = (editor: EditorView): string => {
export const adjustPasteData = (indentAndMark: string, text: string): string => {
- let adjusted = '';
+ let adjusted;
if (text.match(indentAndMarkRE)) {
const matchResult = indentAndMark.match(indentAndMarkRE);