From 3ddbece5d141db0b6ccf237b71d7cd0801efe74c Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Sun, 24 Dec 2017 13:58:15 +0800 Subject: [PATCH] Update fullscreen.js --- src/fullscreen.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fullscreen.js b/src/fullscreen.js index 72f51e7..3719ff9 100644 --- a/src/fullscreen.js +++ b/src/fullscreen.js @@ -38,8 +38,8 @@ class FullScreen { request (type = 'browser') { const anotherType = type === 'browser' ? 'web' : 'browser'; - this.anotherTypeOn = this.isFullScreen(anotherType); - if (!this.anotherTypeOn) { + const anotherTypeOn = this.isFullScreen(anotherType); + if (!anotherTypeOn) { this.lastScrollPosition = utils.getScrollPosition(); } @@ -65,7 +65,7 @@ class FullScreen { break; } - if (this.anotherTypeOn) { + if (anotherTypeOn) { this.cancel(anotherType); } }