mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 13:35:42 +09:00
fix(app): do not crash when the browser translates the page (#2624)
This commit is contained in:
1 parent
044a2c101d
commit
d729f641ff
83 files changed
+3774
-1080
No files matched your search
@@ -165,6 +165,7 @@ const ResultRow = observer(
|
||||
onConfirm(executableResult);
|
||||
};
|
||||
const iconRendered = renderIcon(executableResult, isHighlight, styles.optionIcon, styles.optionIconHighlight);
|
||||
const iconContent: React.ReactElement = iconRendered.content;
|
||||
const key = getViewContext(executableResult)
|
||||
? `${executableResult.type}-${getViewContext(executableResult)}-${executableResult.id}`
|
||||
: `${executableResult.type}-${executableResult.id}`;
|
||||
@@ -194,14 +195,14 @@ const ResultRow = observer(
|
||||
<div className={styles.optionContent} data-flx="search.quick-switcher-bottom-sheet.result-row.option-content">
|
||||
{iconRendered.type === 'avatar' ? (
|
||||
<div className={styles.avatar} data-flx="search.quick-switcher-bottom-sheet.result-row.avatar">
|
||||
{iconRendered.content}
|
||||
{iconContent}
|
||||
</div>
|
||||
) : iconRendered.type === 'guild' ? (
|
||||
<div className={styles.guildIcon} data-flx="search.quick-switcher-bottom-sheet.result-row.guild-icon">
|
||||
{iconRendered.content}
|
||||
{iconContent}
|
||||
</div>
|
||||
) : (
|
||||
iconRendered.content
|
||||
iconContent
|
||||
)}
|
||||
<div
|
||||
className={clsx(styles.optionText, isHighlight && styles.optionHighlight)}
|
||||
|
||||
@@ -181,6 +181,7 @@ const ResultRow = observer(
|
||||
quickStyles.optionIcon,
|
||||
quickStyles.optionIconHighlight,
|
||||
);
|
||||
const iconContent: React.ReactElement = iconRendered.content;
|
||||
const key = getViewContext(executableResult)
|
||||
? `${executableResult.type}-${getViewContext(executableResult)}-${executableResult.id}`
|
||||
: `${executableResult.type}-${executableResult.id}`;
|
||||
@@ -215,17 +216,17 @@ const ResultRow = observer(
|
||||
className={quickStyles.avatar}
|
||||
data-flx="search.quick-switcher.quick-switcher-modal.result-row.div--3"
|
||||
>
|
||||
{iconRendered.content}
|
||||
{iconContent}
|
||||
</div>
|
||||
) : iconRendered.type === 'guild' ? (
|
||||
<div
|
||||
className={quickStyles.guildIcon}
|
||||
data-flx="search.quick-switcher.quick-switcher-modal.result-row.div--4"
|
||||
>
|
||||
{iconRendered.content}
|
||||
{iconContent}
|
||||
</div>
|
||||
) : (
|
||||
iconRendered.content
|
||||
iconContent
|
||||
)}
|
||||
<div
|
||||
className={clsx(quickStyles.optionText, isHighlight && quickStyles.optionHighlight)}
|
||||
|
||||
Reference in new issue
Block a user