Commit 2159c879 authored by Bryce Johnson's avatar Bryce Johnson

Fix spacing in code sample.

parent 7f0ac04d
...@@ -227,14 +227,15 @@ class MyThing { ...@@ -227,14 +227,15 @@ class MyThing {
gl.MyThing = new MyThing(); gl.MyThing = new MyThing();
// best // best
let singleton; let singleton;
class MyThing { class MyThing {
constructor() { constructor() {
if (!singleton) { if (!singleton) {
singleton = this; singleton = this;
singleton.init(); singleton.init();
} }
return singleton; return singleton;
} }
...@@ -246,6 +247,7 @@ class MyThing { ...@@ -246,6 +247,7 @@ class MyThing {
} }
gl.MyThing = MyThing; gl.MyThing = MyThing;
``` ```
## Supported browsers ## Supported browsers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment