Page MenuHomePhabricator

D5839.id19252.diff
No OneTemporary

D5839.id19252.diff

diff --git a/native/markdown/markdown-spoiler.react.js b/native/markdown/markdown-spoiler.react.js
--- a/native/markdown/markdown-spoiler.react.js
+++ b/native/markdown/markdown-spoiler.react.js
@@ -32,10 +32,12 @@
const parsedSpoilerIdentifier = spoilerIdentifier
? parseInt(spoilerIdentifier)
- : -1;
+ : null;
const isRevealed =
- (messageKey && spoilerRevealed[messageKey]?.[parsedSpoilerIdentifier]) ??
+ (messageKey &&
+ parsedSpoilerIdentifier !== null &&
+ spoilerRevealed[messageKey]?.[parsedSpoilerIdentifier]) ??
false;
const styleBasedOnSpoilerState = React.useMemo(() => {
@@ -50,7 +52,7 @@
return;
}
- if (messageKey && parsedSpoilerIdentifier !== -1) {
+ if (messageKey && parsedSpoilerIdentifier !== null) {
setSpoilerRevealed({
...spoilerRevealed,
[messageKey]: {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 3:46 AM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2496080
Default Alt Text
D5839.id19252.diff (874 B)

Event Timeline