diff --git a/lib/amp/plugin.js b/lib/amp/plugin.js index 99740f79..c173f225 100644 --- a/lib/amp/plugin.js +++ b/lib/amp/plugin.js @@ -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 } diff --git a/test/plugin.test.js b/test/plugin.test.js index af996285..2f16c88d 100644 --- a/test/plugin.test.js +++ b/test/plugin.test.js @@ -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)', () => {