From 64d5381d1ed8af9fad1af4186ec2430533670e65 Mon Sep 17 00:00:00 2001 From: Dendy Faist Date: Sun, 9 Feb 2025 13:29:06 +0900 Subject: [PATCH] fix: Do update the terms correctly (oops) --- src/Entity/Note.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Entity/Note.php b/src/Entity/Note.php index 6d8c407..c85f64f 100644 --- a/src/Entity/Note.php +++ b/src/Entity/Note.php @@ -67,10 +67,10 @@ class Note $note->mediaInfo = $note->parseMediaInfo($note->fields['Notes']); // Set VocabKanji field - $terms = Term::fromNoteFields($note->fields); + $note->terms = Term::fromNoteFields($note->fields); // If not defined, find them from the highlighted parts in the sentence - if (empty($terms)) { + if (empty($note->terms)) { // 1. Get all spans in the text preg_match_all( self::HIGHLIGHT_PATTERN, @@ -90,8 +90,6 @@ class Note } } - if (empty($terms)) dd($note); - // Set to null whatever is null $readings = array_map( fn($x) => in_array($x, ['_', '_', '']) ? null : $x,