mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 02:02:29 +08:00
chore(client/ts): fix build errors
This commit is contained in:
parent
7c805eb427
commit
ffa463f1fc
2
src/public/app/types.d.ts
vendored
2
src/public/app/types.d.ts
vendored
@ -95,7 +95,7 @@ declare global {
|
||||
className: string;
|
||||
separateWordSearch: boolean;
|
||||
caseSensitive: boolean;
|
||||
done: () => void;
|
||||
done?: () => void;
|
||||
});
|
||||
unmark(opts?: {
|
||||
done: () => void;
|
||||
|
@ -305,7 +305,10 @@ export default class FindWidget extends NoteContextAwareWidget {
|
||||
const matchCase = this.$caseSensitiveCheckbox.prop("checked");
|
||||
const wholeWord = this.$matchWordsCheckbox.prop("checked");
|
||||
|
||||
const { totalFound, currentFound } = await this.handler?.performFind(searchTerm, matchCase, wholeWord);
|
||||
if (!this.handler) {
|
||||
return;
|
||||
}
|
||||
const { totalFound, currentFound } = await this.handler.performFind(searchTerm, matchCase, wholeWord);
|
||||
|
||||
this.$totalFound.text(totalFound);
|
||||
this.$currentFound.text(currentFound);
|
||||
|
@ -38,7 +38,7 @@ export default class FindInCode {
|
||||
// See https://codemirror.net/addon/search/searchcursor.js for tips
|
||||
const codeEditor = await this.getCodeEditor();
|
||||
if (!codeEditor) {
|
||||
return;
|
||||
return { totalFound: 0, currentFound: 0 };
|
||||
}
|
||||
|
||||
const doc = codeEditor.doc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user