summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2018-08-16 05:15:06 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2018-08-16 05:15:06 +0900
commitfa95641f88df107abd17d8218272b40888e8535c (patch)
treedacb240f559c8f82b1ec3085e4816ceaf071f9c3 /src/client/app/common/scripts
parentMerge pull request #2247 from syuilo/clickable-reaction (diff)
downloadsharkey-fa95641f88df107abd17d8218272b40888e8535c.tar.gz
sharkey-fa95641f88df107abd17d8218272b40888e8535c.tar.bz2
sharkey-fa95641f88df107abd17d8218272b40888e8535c.zip
Use Array.prototype.length to avoid magic number
Diffstat (limited to 'src/client/app/common/scripts')
-rw-r--r--src/client/app/common/scripts/get-kao.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/app/common/scripts/get-kao.ts b/src/client/app/common/scripts/get-kao.ts
index ca7cebaebc..58857edfe1 100644
--- a/src/client/app/common/scripts/get-kao.ts
+++ b/src/client/app/common/scripts/get-kao.ts
@@ -1,6 +1,8 @@
-export default () => [
+const kaos = [
'(=^・・^=)',
'v(\'ω\')v',
'🐡( \'-\' 🐡 )フグパンチ!!!!',
- '🖕(´・_・`)🖕'
-][Math.floor(Math.random() * 4)];
+ '🖕(´・_・`)🖕',
+];
+
+export default () => kaos[Math.floor(Math.random() * kaos.length)];