Skip to content

Commit 6878c92

Browse files
committed
Refactor mount fn
1 parent 8a79c74 commit 6878c92

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## Unreleased
4+
5+
### Fixed
6+
7+
- Null property assignment regression in mount function. [#456]
8+
39
## [4.0.1] - 2018-09-09
410

511
### Fixed

src/instance/mount.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
function failure() {
2-
const root = document.documentElement
3-
4-
root.classList.remove('sr')
2+
document.documentElement.classList.remove('sr')
53

64
return {
75
clean() {},
@@ -15,13 +13,10 @@ function failure() {
1513
}
1614

1715
function success() {
18-
const html = document.documentElement
19-
const body = document.body
20-
21-
html.classList.add('sr')
16+
document.documentElement.classList.add('sr')
2217

23-
if (body) {
24-
body.style.height = '100%'
18+
if (document.body) {
19+
document.body.style.height = '100%'
2520
} else {
2621
document.addEventListener('DOMContentLoaded', () => {
2722
document.body.style.height = '100%'

0 commit comments

Comments
 (0)