diff --git a/core/frontend/services/routing/helpers/fetch-data.js b/core/frontend/services/routing/helpers/fetch-data.js index ddbe2c6981..1c70cb6494 100644 --- a/core/frontend/services/routing/helpers/fetch-data.js +++ b/core/frontend/services/routing/helpers/fetch-data.js @@ -113,8 +113,6 @@ function fetchData(pathOptions, routerOptions, locals) { if (config.type === 'browse') { response.data[name].meta = results[name].meta; - // @TODO remove in v3 - response.data[name][config.resource] = results[name][config.resource]; } }); } diff --git a/test/unit/frontend/services/routing/helpers/fetch-data.test.js b/test/unit/frontend/services/routing/helpers/fetch-data.test.js index f2ec52806b..a67b017f4e 100644 --- a/test/unit/frontend/services/routing/helpers/fetch-data.test.js +++ b/test/unit/frontend/services/routing/helpers/fetch-data.test.js @@ -108,13 +108,9 @@ describe('Unit - services/routing/helpers/fetch-data', function () { should.exist(result); result.should.be.an.Object().with.properties('posts', 'meta', 'data'); result.data.should.be.an.Object().with.properties('featured'); - result.data.featured.should.be.an.Object().with.properties('posts', 'meta'); - result.data.featured.should.not.have.properties('data'); result.posts.length.should.eql(posts.length); result.data.featured.length.should.eql(posts.length); - // @TODO v3 will deprecate this style (featured.posts) - result.data.featured.posts.length.should.eql(posts.length); browsePostsStub.calledTwice.should.be.true(); browsePostsStub.firstCall.args[0].should.have.property('include', 'authors,tags'); @@ -144,13 +140,9 @@ describe('Unit - services/routing/helpers/fetch-data', function () { result.should.be.an.Object().with.properties('posts', 'meta', 'data'); result.data.should.be.an.Object().with.properties('featured'); - result.data.featured.should.be.an.Object().with.properties('posts', 'meta'); - result.data.featured.should.not.have.properties('data'); result.posts.length.should.eql(posts.length); result.data.featured.length.should.eql(posts.length); - // @TODO v3 will deprecate this style (featured.posts) - result.data.featured.posts.length.should.eql(posts.length); browsePostsStub.calledTwice.should.be.true(); browsePostsStub.firstCall.args[0].should.have.property('include', 'authors,tags');