diff options
author | Bryce Johnson <bryce@gitlab.com> | 2016-11-01 20:40:01 +0100 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2016-11-01 20:40:01 +0100 |
commit | 2159c8792b289bb27f9947fb834fbd497efeeb28 (patch) | |
tree | 1bc2c621d0e9a2f61093c9b28350985339965717 /doc/development | |
parent | 7f0ac04db59cb290961bd77a4e0d18cffd248151 (diff) | |
download | gitlab-ce-2159c8792b289bb27f9947fb834fbd497efeeb28.tar.gz |
Fix spacing in code sample.google-singletons-are
Diffstat (limited to 'doc/development')
-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 |