Skip to content

Commit

Permalink
Update core note::update_content not to return None transition (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
panarch authored Nov 19, 2024
1 parent 0604e19 commit 1eaa992
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/src/state/notebook/consume/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,9 @@ pub async fn update_content(
content: String,
) -> Result<NotebookTransition> {
let current = db.fetch_note_content(note_id.clone()).await?;

if current == content {
Ok(NotebookTransition::None)
} else {
if current != content {
db.update_note_content(note_id.clone(), content).await?;
Ok(NotebookTransition::UpdateNoteContent(note_id))
}

Ok(NotebookTransition::UpdateNoteContent(note_id))
}

0 comments on commit 1eaa992

Please sign in to comment.