Commit 06b8e5e6 authored by Nathan Agrin's avatar Nathan Agrin Committed by Naoyuki Kanezawa

Fix userAgent reference in getInitialProps example (#81)

The getInitialProps example references `req.header.userAgent`, which does not exist. `req.headers['user-agent']` does.
parent 95719c95
......@@ -108,7 +108,7 @@ import React from 'react'
export default class extends React.Component {
static async getInitialProps ({ req }) {
return req
? { userAgent: req.headers.userAgent }
? { userAgent: req.headers['user-agent'] }
: { userAgent: navigator.userAgent }
}
render () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment