fix: make "People and body" category work in Firefox content script (#357)
Co-authored-by: Nolan Lawson <nolan@nolanlawson.com>
This commit is contained in:
parent
d4365af442
commit
b829d4c8ce
|
@ -4,6 +4,11 @@ export function cleanEmoji (emoji) {
|
|||
if (!emoji) {
|
||||
return emoji
|
||||
}
|
||||
// if inside a Firefox content script, need to clone the emoji object to prevent Firefox from complaining about cross-origin object
|
||||
/* istanbul ignore if */
|
||||
if (typeof wrappedJSObject !== 'undefined') {
|
||||
emoji = structuredClone(emoji)
|
||||
}
|
||||
delete emoji.tokens
|
||||
if (emoji.skinTones) {
|
||||
const len = emoji.skinTones.length
|
||||
|
|
Loading…
Reference in New Issue