diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-02-08 20:48:41 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-02-08 21:16:10 +0300 |
commit | 38bcc1e0e725dc171837d27dc6852f07c803cc76 (patch) | |
tree | 78e2ac606df5963b55daeb2214effe83e2a246fc /app | |
parent | e0d93a5a1f8014a3bf4e400d6da9c7f90ee19e7d (diff) |
Looks for correct key to pass to commit prop. Adds rspec test.
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 b/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 index c819f0dd7cd..61c1b72d9d2 100644 --- a/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 +++ b/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 @@ -111,7 +111,7 @@ require('./commit'); * If provided, returns the commit ref. * Needed to render the commit component column. * - * Matched `url` prop sent in the API to `path` prop needed + * Matches `path` prop sent in the API to `ref_url` prop needed * in the commit component. * * @returns {Object|Undefined} @@ -119,8 +119,8 @@ require('./commit'); commitRef() { if (this.pipeline.ref) { return Object.keys(this.pipeline.ref).reduce((accumulator, prop) => { - if (prop === 'url') { - accumulator.path = this.pipeline.ref[prop]; + if (prop === 'path') { + accumulator.ref_url = this.pipeline.ref[prop]; } else { accumulator[prop] = this.pipeline.ref[prop]; } |