Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(script): useContext not provided in imports (closes #9152)
Elian Doran1764fcbba20d
diff --git a/apps/client/src/services/frontend_script_api_preact.ts b/apps/client/src/services/frontend_script_api_preact.tsindex 2829ca101e..a8c6f52a3d 100644--- a/apps/client/src/services/frontend_script_api_preact.ts+++ b/apps/client/src/services/frontend_script_api_preact.ts@@ -1,4 +1,4 @@-import { Fragment, h, VNode } from "preact";+import { createContext,Fragment, h, VNode } from "preact";import * as hooks from "preact/hooks";import ActionButton from "../widgets/react/ActionButton";@@ -47,6 +47,7 @@ export const preactAPI = Object.freeze({// Coreh,Fragment,+ createContext,/*** Method that must be run for widget scripts that run on Preact, using JSX. The method just returns the same definition, reserved for future typechecking and perhaps validation purposes.