Page MenuHomePhabricator

D5839.diff
No OneTemporary

D5839.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, 2:00 AM (19 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2496080
Default Alt Text
D5839.diff (874 B)

Event Timeline