Skip to content

Commit 19fa5de

Browse files
committed
fix exiting fullscreen throwing an error
1 parent c0ed490 commit 19fa5de

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A plugin that integrate with Pipelab <br>
55
Author: Armaldio <br>
66
Website: https://github.com/CynToolkit/construct-plugin <br>
77
Addon Url: https://github.com/CynToolkit/construct-plugin <br>
8-
Download Latest Version : [Version: 2.0.1](https://github.com/CynToolkit/construct-plugin/releases/latest) <br>
8+
Download Latest Version : [Version: 2.1.0](https://github.com/CynToolkit/construct-plugin/releases/latest) <br>
99
<sub>Made using [c3ide2-framework](https://github.com/ConstructFund/c3ide2-framework) </sub><br>
1010

1111
## Table of Contents

src/instance.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,9 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
955955
if (toggle === 1) {
956956
document.documentElement.requestFullscreen()
957957
} else {
958-
document.exitFullscreen()
958+
if (document.fullscreenEnabled) {
959+
document.exitFullscreen()
960+
}
959961
}
960962
}
961963
})

0 commit comments

Comments
 (0)