Skip to content

Commit

Permalink
internal/short: avoid uncessary assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
changkun committed Dec 20, 2023
1 parent 04d5153 commit 29ed6e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/short/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ func Edit(ctx context.Context, s *db.Store, operate Op, a string, r *models.Redi
// into concurrent inconsistent issue. But for small scale
// use, it is fine for now.
rr, err = s.FetchAlias(ctx, a)
if err != nil {
err = nil
} else {
if err == nil {
// use old values if not presents
if r.URL == "" {
r.URL = rr.URL
Expand Down

0 comments on commit 29ed6e5

Please sign in to comment.