diff --git a/src/awkward/operations/ak_with_field.py b/src/awkward/operations/ak_with_field.py index 989554a84d..dce6c0d441 100644 --- a/src/awkward/operations/ak_with_field.py +++ b/src/awkward/operations/ak_with_field.py @@ -94,9 +94,7 @@ def purelist_is_record(layout): def action_is_record(input, **kwargs): nonlocal result - if input.is_list: - return input - elif input.is_record: + if input.is_record: result = True return input elif input.is_union: