Skip to content

Commit

Permalink
fix: make "People and body" category work in Firefox content script (#…
Browse files Browse the repository at this point in the history
…357)

Co-authored-by: Nolan Lawson <nolan@nolanlawson.com>
  • Loading branch information
dimdenGD and nolanlawson committed Jun 30, 2023
1 parent d4365af commit b829d4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/database/utils/cleanEmoji.js
Expand Up @@ -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
Expand Down

0 comments on commit b829d4c

Please sign in to comment.