Skip to content

Commit

Permalink
fix: do not add .amp posix to page layout
Browse files Browse the repository at this point in the history
BREAKING CHANGE: with introducing `ampLayout` there no need to force '.amp` posix foa layouts.
  • Loading branch information
farnabaz committed Sep 19, 2019
1 parent 44480b8 commit f5abdcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/amp/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ const createCustomLayout = (originalLayout, ampLayout) => function customLayout
if (typeof layout === 'function') {
layout = layout.call(this, ctx)
}
return ctx.app.$isAMP ? layout + '.amp' : layout
return layout
}
2 changes: 1 addition & 1 deletion test/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('Plugin', () => {
return 'custom.amp.layout'
}
Plugin.default(ctx, inject)
expect(route.matched[0].components.default.options.layout(ctx)).toEqual('custom.amp.layout.amp')
expect(route.matched[0].components.default.options.layout(ctx)).toEqual('custom.amp.layout')
})

it('Evaluate layout option (non AMP)', () => {
Expand Down

0 comments on commit f5abdcb

Please # to comment.