Skip to content

Commit

Permalink
fix(validator): add isAMP to req object
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Dec 27, 2020
1 parent 93a0964 commit 40d4954
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/runtime/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ export default function (ctx, { origin, mode }) {
options.layout = createCustomLayout(options.layout, options.ampLayout)
options._amp = true
}
const _request = req || {}
_request.isAMP = isAMP
return {
/**
* This will use to detect amp request on render hook
*/
req: req || { isAMP },
req: _request,
isAMP,
ampMode
}
Expand Down

0 comments on commit 40d4954

Please # to comment.