Skip to content

Commit 73a7e5f

Browse files
committed
document -> _document
1 parent 4690a6a commit 73a7e5f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/create-instance/add-scoped-slots.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export function addScopedSlots (vm: Component, scopedSlots: Object): void {
1010
throwError('the scopedSlots option does not support a template tag as the root element.')
1111
}
1212
const domParser = new window.DOMParser()
13-
const document = domParser.parseFromString(template, 'text/html')
13+
const _document = domParser.parseFromString(template, 'text/html')
1414
vm.$_vueTestUtils_scopedSlots[key] = compileToFunctions(template).render
15-
vm.$_vueTestUtils_slotScopes[key] = document.body.firstChild.getAttribute('slot-scope')
15+
vm.$_vueTestUtils_slotScopes[key] = _document.body.firstChild.getAttribute('slot-scope')
1616
})
1717
}

packages/create-instance/add-slots.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ function addSlotToVm (vm: Component, slotName: string, slotValue: Component | st
1414
throwError('the slots option does not support strings in PhantomJS. Please use Puppeteer, or pass a component.')
1515
}
1616
const domParser = new window.DOMParser()
17-
const document = domParser.parseFromString(slotValue, 'text/html')
17+
const _document = domParser.parseFromString(slotValue, 'text/html')
1818
const _slotValue = slotValue.trim()
19-
if (_slotValue[0] === '<' && _slotValue[_slotValue.length - 1] === '>' && document.body.childElementCount === 1) {
19+
if (_slotValue[0] === '<' && _slotValue[_slotValue.length - 1] === '>' && _document.body.childElementCount === 1) {
2020
elem = vm.$createElement(compileToFunctions(slotValue))
2121
} else {
2222
const compiledResult = compileToFunctions(`<div>${slotValue}{{ }}</div>`)

0 commit comments

Comments
 (0)