Structure field error: Cannot read property 'length' of undefined

Sorry my blueprint is very rough, testing at the moment.

          style:
            label: Style
            sortBy: option desc
            translate: false
            type: structure
            fields:
              option:
                label: Option
                options:
                  alignment: Alignment
                  test: Test
                type: select
              alignment:
                default: align-center
                label: Alignment
                options:
                  align-center: Center
                  align-left: Left
                  align-right: Right
                required: true
                type: select
                when:
                  option: alignment
              test:
                default: align-center
                label: Alignment
                options:
                  align-center: Center
                  align-left: Left
                  align-right: Right
                required: true
                type: select
                when:
                  option: test

When I add sortBy: option desc: