Unverified Commit 18cb2c03 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Simplify default title (#5968)

parent b0cad337
const DEFAULT_TITLE = ''
const DOMAttributeNames = { const DOMAttributeNames = {
acceptCharset: 'accept-charset', acceptCharset: 'accept-charset',
className: 'class', className: 'class',
...@@ -39,12 +36,10 @@ export default class HeadManager { ...@@ -39,12 +36,10 @@ export default class HeadManager {
} }
updateTitle (component) { updateTitle (component) {
let title let title = ''
if (component) { if (component) {
const { children } = component.props const { children } = component.props
title = typeof children === 'string' ? children : children.join('') title = typeof children === 'string' ? children : children.join('')
} else {
title = DEFAULT_TITLE
} }
if (title !== document.title) document.title = title if (title !== document.title) document.title = title
} }
......
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