未验证 提交 18cb2c03 编写于 作者: T Tim Neutkens 提交者: GitHub

Simplify default title (#5968)

上级 b0cad337
const DEFAULT_TITLE = ''
const DOMAttributeNames = {
acceptCharset: 'accept-charset',
className: 'class',
......@@ -39,12 +36,10 @@ export default class HeadManager {
}
updateTitle (component) {
let title
let title = ''
if (component) {
const { children } = component.props
title = typeof children === 'string' ? children : children.join('')
} else {
title = DEFAULT_TITLE
}
if (title !== document.title) document.title = title
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册