diff options
author | Bryce Johnson <bryce@gitlab.com> | 2016-11-01 22:40:01 +0300 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2016-11-01 22:40:01 +0300 |
commit | 2159c8792b289bb27f9947fb834fbd497efeeb28 (patch) | |
tree | 1bc2c621d0e9a2f61093c9b28350985339965717 /doc/development/frontend.md | |
parent | 7f0ac04db59cb290961bd77a4e0d18cffd248151 (diff) |
Fix spacing in code sample.
Diffstat (limited to 'doc/development/frontend.md')
-rw-r--r-- | doc/development/frontend.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/development/frontend.md b/doc/development/frontend.md index 735b41314ef..c6aafc926ee 100644 --- a/doc/development/frontend.md +++ b/doc/development/frontend.md @@ -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 |