Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Elian Doran 2025-11-15 15:37:00 +02:00 committed by GitHub
parent a89756a76c
commit 57f220e64c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -69,7 +69,7 @@ function removeOwnedLabelByName(note: FNote, labelName: string) {
* @returns `true` if an attribute was identified and removed, `false` otherwise. * @returns `true` if an attribute was identified and removed, `false` otherwise.
*/ */
function removeOwnedRelationByName(note: FNote, relationName: string) { function removeOwnedRelationByName(note: FNote, relationName: string) {
const label = note.getOwnedRelation(relationName); const relation = note.getOwnedRelation(relationName);
if (label) { if (label) {
removeAttributeById(note.noteId, label.attributeId); removeAttributeById(note.noteId, label.attributeId);
return true; return true;

View File

@ -7,7 +7,7 @@ import type { EntityChange } from "../server_types.js";
interface NoteRow { interface NoteRow {
blobId: string; blobId: string;
dateCreated: string; dateCreated: string;
dateMOdified: string; dateModified: string;
isDeleted?: boolean; isDeleted?: boolean;
isProtected?: boolean; isProtected?: boolean;
mime: string; mime: string;

View File

@ -268,7 +268,7 @@ export function TitleEditor({ currentValue, placeholder, save, dismiss, mode, is
} }
}; };
const onBlur = (newValue) => { const onBlur = (newValue: string) => {
if (!shouldDismiss.current && newValue.trim() && (newValue !== currentValue || isNewItem)) { if (!shouldDismiss.current && newValue.trim() && (newValue !== currentValue || isNewItem)) {
save(newValue); save(newValue);
dismissOnNextRefreshRef.current = true; dismissOnNextRefreshRef.current = true;
@ -311,6 +311,6 @@ export function TitleEditor({ currentValue, placeholder, save, dismiss, mode, is
dismiss(); dismiss();
}} }}
/> />
) );
} }
} }