mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
fix(code/find): crashes at dialog shown
This commit is contained in:
@@ -203,7 +203,7 @@ export default class FindWidget extends NoteContextAwareWidget {
|
||||
selectedText = $content.find('.cm-matchhighlight').first().text();
|
||||
} else {
|
||||
const codeEditor = await this.noteContext.getCodeEditor();
|
||||
selectedText = codeEditor.getSelection();
|
||||
selectedText = codeEditor.getSelectedText();
|
||||
}
|
||||
} else {
|
||||
selectedText = window.getSelection()?.toString() || "";
|
||||
|
||||
Reference in New Issue
Block a user