Skip to content

Commit

Permalink
fix: Remove a redundant variable assignment in the Sync function
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobefu committed Jan 27, 2025
1 parent 0432f58 commit 81239cd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/cs_sdk/functions/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func getNewSyncToken(data map[string]interface{}) (string, error) {
}

func addAllAssets(data map[string]interface{}) error {
items, hasItems := data["items"].([]interface{})
items, hasItems := data["items"].([]map[string]interface{})

if !hasItems {
return errors.New("sync data has no items")
Expand All @@ -98,8 +98,6 @@ func addAllAssets(data map[string]interface{}) error {
itemCount := len(items)

for idx, item := range items {
item := item.(map[string]interface{})

contentTypeUid, hasContentTypeUid := item["content_type_uid"]

if !hasContentTypeUid || contentTypeUid.(string) != "sys_assets" {
Expand Down

0 comments on commit 81239cd

Please sign in to comment.