logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: fe269b2cf99b52703d37a76be87a52cdaa0d36ad
parent: 855f8b4f2789bdac84cdc061c2cec50dc755ccba
Author: eal <eal@waifu.club>
Date:   Thu,  7 Dec 2017 21:42:00 +0000

Merge branch 'fix/gs-emoji-error' into 'develop'

Suppress emoji fetch error on gs.

See merge request pleroma/pleroma-fe!183

Diffstat:

Msrc/main.js20+++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/main.js b/src/main.js @@ -129,10 +129,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) + )