Skip to content

Commit

Permalink
update url also when offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Midov committed May 3, 2020
1 parent 9f7c8bf commit 3fe593d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ func updateHandler(cmd *cobra.Command, args []string) {
book.Excerpt = excerpt
}

// If user submits url, use it
if url != "" {
book.URL = url
}

// Make sure title is valid and not empty
book.Title = validateTitle(book.Title, book.URL)

Expand Down

0 comments on commit 3fe593d

Please sign in to comment.