diff --git a/app/components/found-manuscripts/index.js b/app/components/found-manuscripts/index.js index 52915eb7..1c8a9fc7 100644 --- a/app/components/found-manuscripts/index.js +++ b/app/components/found-manuscripts/index.js @@ -46,7 +46,7 @@ export default class FoundManuscriptsComponent extends Component { const foundOAMss = yield this.oaManuscriptService.lookup(doi); if (foundOAMss) { - this.foundManuscripts.push(foundOAMss); + this.foundManuscripts = [...foundOAMss]; } }; } diff --git a/tests/integration/components/found-manuscripts/component-test.js b/tests/integration/components/found-manuscripts/component-test.js index 9b026f80..1ace9caf 100644 --- a/tests/integration/components/found-manuscripts/component-test.js +++ b/tests/integration/components/found-manuscripts/component-test.js @@ -47,10 +47,12 @@ module('Integration | Component | found-manuscripts', (hooks) => { const mockMsService = Service.extend({ lookup(doi) { assert.ok(doi, 'DOI needs to be present'); - return Promise.resolve({ - name: 'This is a moo', - url: 'http://moo.example.com', - }); + return Promise.resolve([ + { + name: 'This is a moo', + url: 'http://moo.example.com', + }, + ]); }, });