File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,14 @@ let shaderCache = new WeakMap
23
23
24
24
// Safari does not support font-stretch
25
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
26
+ if ( document . body ) {
27
+ let el = document . body . appendChild ( document . createElement ( 'div' ) )
28
+ el . style . font = 'italic small-caps bold condensed 16px/2 cursive'
29
+ if ( getComputedStyle ( el ) . fontStretch ) {
30
+ isStretchSupported = true
31
+ }
32
+ document . body . removeChild ( el )
30
33
}
31
- document . body . removeChild ( el )
32
34
33
35
class GlText {
34
36
constructor ( o ) {
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " gl-text" ,
3
- "version" : " 1.1.4 " ,
2
+ "name" : " @etpinard/ gl-text" ,
3
+ "version" : " 1.1.6 " ,
4
4
"description" : " Render text with WebGL" ,
5
5
"main" : " dist.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments