Fix spacing in code sample.
This commit is contained in:
parent
7f0ac04db5
commit
2159c8792b
|
@ -227,14 +227,15 @@ class MyThing {
|
|||
gl.MyThing = new MyThing();
|
||||
|
||||
// best
|
||||
|
||||
let singleton;
|
||||
|
||||
class MyThing {
|
||||
constructor() {
|
||||
if (!singleton) {
|
||||
singleton = this;
|
||||
singleton.init();
|
||||
}
|
||||
singleton = this;
|
||||
singleton.init();
|
||||
}
|
||||
return singleton;
|
||||
}
|
||||
|
||||
|
@ -246,6 +247,7 @@ class MyThing {
|
|||
}
|
||||
|
||||
gl.MyThing = MyThing;
|
||||
|
||||
```
|
||||
|
||||
## Supported browsers
|
||||
|
|
Loading…
Reference in New Issue