aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-12-07 23:37:05 +0200
committereal <eal@waifu.club>2017-12-07 23:37:05 +0200
commit1db1529dece0d75c6ab63ed39bb101344d81e3a1 (patch)
treeeaa1e39cafd195568323b48d4d934d67b5997cf0
parentf72d6ec83ef753241a9329306c0b3fdf1c3cf534 (diff)
Suppress emoji fetch error on gs.
-rw-r--r--src/main.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/main.js b/src/main.js
index 6c5bf83e..cee9fe9a 100644
--- a/src/main.js
+++ b/src/main.js
@@ -121,10 +121,16 @@ window.fetch('/static/terms-of-service.html')
})
window.fetch('/api/pleroma/emoji.json')
- .then((res) => res.json())
- .then((values) => {
- const emoji = Object.keys(values).map((key) => {
- return { shortcode: key, image_url: values[key] }
- })
- store.dispatch('setOption', { name: 'emoji', value: emoji })
- })
+ .then(
+ (res) => res.json()
+ .then(
+ (values) => {
+ const emoji = Object.keys(values).map((key) => {
+ return { shortcode: key, image_url: values[key] }
+ })
+ store.dispatch('setOption', { name: 'emoji', value: emoji })
+ },
+ (failure) => {}
+ ),
+ (error) => console.log(error)
+ )