We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae7d15f commit 0205af8Copy full SHA for 0205af8
index.js
@@ -23,12 +23,14 @@ let shaderCache = new WeakMap
23
24
// Safari does not support font-stretch
25
let isStretchSupported = false
26
-let el = document.body.appendChild(document.createElement('div'))
27
-el.style.font = 'italic small-caps bold condensed 16px/2 cursive'
28
-if (getComputedStyle(el).fontStretch) {
29
- isStretchSupported = true
+if (document.body) {
+ let el = document.body.appendChild(document.createElement('div'))
+ el.style.font = 'italic small-caps bold condensed 16px/2 cursive'
+ if (getComputedStyle(el).fontStretch) {
30
+ isStretchSupported = true
31
+ }
32
+ document.body.removeChild(el)
33
}
-document.body.removeChild(el)
34
35
class GlText {
36
constructor (o) {
0 commit comments