Commit 6b637ff7 authored by Nathan Friend's avatar Nathan Friend

Merge branch 'tz-optimize-emoji-map-creation' into 'master'

Deactivates Emoji Map Creation for Bots + Crawlers

See merge request gitlab-org/gitlab!45016
parents ed32becc 72bb051e
......@@ -5,6 +5,14 @@ import getUnicodeSupportMap from './unicode_support_map';
let browserUnicodeSupportMap;
export default function isEmojiUnicodeSupportedByBrowser(emojiUnicode, unicodeVersion) {
// Skipping the map creation for Bots + RSPec
if (
navigator.userAgent.indexOf('HeadlessChrome') > -1 ||
navigator.userAgent.indexOf('Lighthouse') > -1 ||
navigator.userAgent.indexOf('Speedindex') > -1
) {
return true;
}
browserUnicodeSupportMap = browserUnicodeSupportMap || getUnicodeSupportMap();
return isEmojiUnicodeSupported(browserUnicodeSupportMap, emojiUnicode, unicodeVersion);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment