|
|
@@ -27,7 +27,7 @@ export function parseComponent (
|
|
|
customBlocks: []
|
|
|
}
|
|
|
let depth = 0
|
|
|
- let currentBlock: ?(SFCBlock | SFCCustomBlock) = null
|
|
|
+ let currentBlock: ?SFCBlock = null
|
|
|
|
|
|
function start (
|
|
|
tag: string,
|
|
|
@@ -44,7 +44,7 @@ export function parseComponent (
|
|
|
attrs: attrs.reduce((cumulated, { name, value }) => {
|
|
|
cumulated[name] = value || true
|
|
|
return cumulated
|
|
|
- }, Object.create(null))
|
|
|
+ }, {})
|
|
|
}
|
|
|
if (isSpecialTag(tag)) {
|
|
|
checkAttrs(currentBlock, attrs)
|
|
|
@@ -95,7 +95,7 @@ export function parseComponent (
|
|
|
depth--
|
|
|
}
|
|
|
|
|
|
- function padContent (block: SFCBlock | SFCCustomBlock, pad: true | "line" | "space") {
|
|
|
+ function padContent (block: SFCBlock, pad: true | "line" | "space") {
|
|
|
if (pad === 'space') {
|
|
|
return content.slice(0, block.start).replace(replaceRE, ' ')
|
|
|
} else {
|