diff options
author | Hsuan Lee <hsuan@cobinhood.com> | 2018-11-15 07:59:35 +0800 |
---|---|---|
committer | Hsuan Lee <hsuan@cobinhood.com> | 2018-12-10 18:52:34 +0800 |
commit | cb9e5cd9ae654b4100924db48535a96925830d3d (patch) | |
tree | 23f65f62b55aad9d707100f29d3553df09a9b5be | |
parent | 39a903d9ca46cbd7b9782fca8aeba89868c38ae5 (diff) | |
download | dexon-wallet-cb9e5cd9ae654b4100924db48535a96925830d3d.tar.gz dexon-wallet-cb9e5cd9ae654b4100924db48535a96925830d3d.tar.zst dexon-wallet-cb9e5cd9ae654b4100924db48535a96925830d3d.zip |
Defensive against undefined target
-rw-r--r-- | mascara/src/app/first-time/notice-screen.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mascara/src/app/first-time/notice-screen.js b/mascara/src/app/first-time/notice-screen.js index 482b2875..733ff9f3 100644 --- a/mascara/src/app/first-time/notice-screen.js +++ b/mascara/src/app/first-time/notice-screen.js @@ -60,6 +60,9 @@ class NoticeScreen extends Component { if (this.state.atBottom) return const target = document.querySelector('.tou__body') + + if (!target) return + const {scrollTop, offsetHeight, scrollHeight} = target const atBottom = scrollTop + offsetHeight + 100 >= scrollHeight |