mirror of
https://github.com/docmost/docmost.git
synced 2026-08-30 18:36:26 +08:00
fix: searchTerm type error
This commit is contained in:
@@ -422,6 +422,8 @@ export const SearchAndReplace = Extension.create<
|
|||||||
state: {
|
state: {
|
||||||
init: () => DecorationSet.empty,
|
init: () => DecorationSet.empty,
|
||||||
apply({ doc, docChanged }, oldState) {
|
apply({ doc, docChanged }, oldState) {
|
||||||
|
const storage = editor.storage.searchAndReplace;
|
||||||
|
if (!storage) return oldState;
|
||||||
const {
|
const {
|
||||||
searchTerm,
|
searchTerm,
|
||||||
lastSearchTerm,
|
lastSearchTerm,
|
||||||
@@ -429,7 +431,7 @@ export const SearchAndReplace = Extension.create<
|
|||||||
lastCaseSensitive,
|
lastCaseSensitive,
|
||||||
resultIndex,
|
resultIndex,
|
||||||
lastResultIndex,
|
lastResultIndex,
|
||||||
} = editor.storage.searchAndReplace;
|
} = storage;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!docChanged &&
|
!docChanged &&
|
||||||
|
|||||||
Reference in New Issue
Block a user