diff options
Diffstat (limited to 'app/assets/javascripts/emoji')
-rw-r--r-- | app/assets/javascripts/emoji/awards_app/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/emoji/index.js | 9 | ||||
-rw-r--r-- | app/assets/javascripts/emoji/support/unicode_support_map.js | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/javascripts/emoji/awards_app/index.js b/app/assets/javascripts/emoji/awards_app/index.js index 0986533dcd1..931407f4cf7 100644 --- a/app/assets/javascripts/emoji/awards_app/index.js +++ b/app/assets/javascripts/emoji/awards_app/index.js @@ -5,6 +5,8 @@ import AwardsList from '~/vue_shared/components/awards_list.vue'; import createstore from './store'; export default (el) => { + if (!el) return null; + const { dataset: { path }, } = el; diff --git a/app/assets/javascripts/emoji/index.js b/app/assets/javascripts/emoji/index.js index aaae1624bee..4fdcdcc1b04 100644 --- a/app/assets/javascripts/emoji/index.js +++ b/app/assets/javascripts/emoji/index.js @@ -245,5 +245,12 @@ export function glEmojiTag(inputName, options) { ? `data-fallback-sprite-class="${escape(fallbackSpriteClass)}" ` : ''; - return `<gl-emoji ${fallbackSpriteAttribute}data-name="${escape(name)}"></gl-emoji>`; + const fallbackUrl = opts.url; + const fallbackSrcAttribute = fallbackUrl + ? `data-fallback-src="${fallbackUrl}" data-unicode-version="custom"` + : ''; + + return `<gl-emoji ${fallbackSrcAttribute}${fallbackSpriteAttribute}data-name="${escape( + name, + )}"></gl-emoji>`; } diff --git a/app/assets/javascripts/emoji/support/unicode_support_map.js b/app/assets/javascripts/emoji/support/unicode_support_map.js index d90a774c293..9642993bd7d 100644 --- a/app/assets/javascripts/emoji/support/unicode_support_map.js +++ b/app/assets/javascripts/emoji/support/unicode_support_map.js @@ -1,4 +1,4 @@ -import AccessorUtilities from '../../lib/utils/accessor'; +import AccessorUtilities from '~/lib/utils/accessor'; const GL_EMOJI_VERSION = '0.2.0'; |