Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36902

Refactor destructured objects to not be destructured.

XMLWordPrintable

      Example below make it hard to read code. In general destructing nested data should probably be avoided.

       const {
                  context: {
                      router,
                      location,
                      pipeline: {
                          _class: pipelineClass,
                          fullName,
                          organization,
                      },
                  },
                  props: {
                      result: {
                          durationInMillis,
                          estimatedDurationInMillis,
                          pipeline,
                          id,
                          result,
                          state,
                          startTime,
                          endTime,
                          commitId,
                      },
                      changeset,
                  },
              } = this;
      

            Unassigned Unassigned
            imeredith Ivan Meredith
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: