Skip to content

Commit

Permalink
UBER-289: Prevent empty changes to go into transactions. (#3277)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
  • Loading branch information
haiodo authored May 29, 2023
1 parent eae0107 commit 6b7e83c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
const updates: Partial<Data<Vacancy>> = {}
const trimmedName = rawName.trim()
if (trimmedName.length > 0 && trimmedName !== object.name) {
if (trimmedName.length > 0 && trimmedName !== object.name?.trim()) {
updates.name = trimmedName
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
const trimmedTitle = title.trim()
if (trimmedTitle.length > 0 && trimmedTitle !== issue.title) {
if (trimmedTitle.length > 0 && trimmedTitle !== issue.title?.trim()) {
await client.update(issue, { title: trimmedTitle })
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
const trimmedTitle = title.trim()
if (trimmedTitle.length > 0 && trimmedTitle !== template.title) {
if (trimmedTitle.length > 0 && trimmedTitle !== template.title?.trim()) {
await client.update(template, { title: trimmedTitle })
}
}
Expand Down

0 comments on commit 6b7e83c

Please sign in to comment.