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
Apply suggestions from code review
Elian Doran22d853e0b0c7
diff --git a/apps/client/src/services/frontend_script_api_preact.ts b/apps/client/src/services/frontend_script_api_preact.tsindex a8c6f52a3d..9ce7a52e72 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 { createContext,Fragment, h, VNode } from "preact";+import { createContext, Fragment, h, VNode } from "preact";import * as hooks from "preact/hooks";import ActionButton from "../widgets/react/ActionButton";diff --git a/apps/client/src/widgets/type_widgets/relation_map/api.ts b/apps/client/src/widgets/type_widgets/relation_map/api.tsindex 10cacff6ed..dec79bfa8a 100644--- a/apps/client/src/widgets/type_widgets/relation_map/api.ts+++ b/apps/client/src/widgets/type_widgets/relation_map/api.ts@@ -87,8 +87,8 @@ export default class RelationMapApi {);if (exists) return false;- await server.remove(`notes/${relation.sourceNoteId}/relations/${relation.name}/to/${relation.targetNoteId}`);await server.put(`notes/${relation.sourceNoteId}/relations/${newName}/to/${relation.targetNoteId}`);+ await server.remove(`notes/${relation.sourceNoteId}/relations/${relation.name}/to/${relation.targetNoteId}`);this.onDataChange(true);return true;}diff --git a/apps/server/src/services/backend_script_api.ts b/apps/server/src/services/backend_script_api.tsindex d84b21fb39..3eff3cc355 100644--- a/apps/server/src/services/backend_script_api.ts+++ b/apps/server/src/services/backend_script_api.ts@@ -621,7 +621,7 @@ function BackendScriptApi(this: Api, currentNote: BNote, apiParams: ApiParams) {}const parentNoteId = opts.isVisible ? "_lbVisibleLaunchers" : "_lbAvailableLaunchers";- const noteId = `al_${ opts.id}`;+ const noteId = `al_${opts.id}`;const launcherNote =becca.getNote(noteId) ||@@ -699,7 +699,6 @@ function BackendScriptApi(this: Api, currentNote: BNote, apiParams: ApiParams) {return `!@#Function: ${p.toString()}`;}return p;-});}};