@@ -6,7 +6,7 @@ import attributes from "../../services/attributes";
66import FNote from "../../entities/fnote" ;
77import toast from "../../services/toast" ;
88import froca from "../../services/froca" ;
9- import { useContext , useEffect , useMemo , useState } from "preact/hooks" ;
9+ import { useContext , useEffect , useState } from "preact/hooks" ;
1010import { ParentComponent } from "../react/react_utils" ;
1111import { useTriliumEvent } from "../react/hooks" ;
1212import appContext from "../../components/app_context" ;
@@ -75,7 +75,7 @@ export default function SearchDefinitionTab({ note, ntxId, hidden, noteContext }
7575
7676 useEffect ( ( ) => {
7777 async function autoExecute ( ) {
78- if ( ! note || note ? .type !== "search" || ! note ? .hasLabel ( "autoExecuteSearch" ) ) {
78+ if ( ! note || note . type !== "search" || ! note . hasLabel ( "autoExecuteSearch" ) ) {
7979 executionState . save ( "" ) ;
8080 return ;
8181 }
@@ -182,10 +182,10 @@ export default function SearchDefinitionTab({ note, ntxId, hidden, noteContext }
182182}
183183
184184const executionState = function ( ) {
185- let LAST_AUTO_EXECUTED_SEARCH_NOTE_ID = "" ;
185+ let lastAutoExecutedSearchNoteId = "" ;
186186 return {
187- load : ( ) => LAST_AUTO_EXECUTED_SEARCH_NOTE_ID ,
188- save : ( noteId : string ) => LAST_AUTO_EXECUTED_SEARCH_NOTE_ID = noteId ,
187+ load : ( ) => lastAutoExecutedSearchNoteId ,
188+ save : ( noteId : string ) => lastAutoExecutedSearchNoteId = noteId ,
189189 } ;
190190} ( ) ;
191191
0 commit comments