Skip to content

Commit ed5da92

Browse files
Fix static check issue
1 parent b047b95 commit ed5da92

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

cmd/lk/phone_number.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,10 @@ func appendPhoneNumberToDispatchRule(ctx context.Context, cmd *cli.Command, disp
211211
currentRule := rules[0]
212212

213213
// Check if phone number ID is already in trunk_ids
214-
// Handle nil or empty trunk_ids explicitly
215-
if currentRule.TrunkIds != nil && len(currentRule.TrunkIds) > 0 {
216-
for _, trunkID := range currentRule.TrunkIds {
217-
if trunkID == phoneNumberID {
218-
// Already in the list, no need to update
219-
return nil
220-
}
214+
for _, trunkID := range currentRule.TrunkIds {
215+
if trunkID == phoneNumberID {
216+
// Already in the list, no need to update
217+
return nil
221218
}
222219
}
223220

0 commit comments

Comments
 (0)