Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3246827
D5839.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
874 B
Referenced Files
None
Subscribers
None
D5839.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5839: [native] Default parsedSpoilerIdentifier to null
Attached
Detach File
Event Timeline
Log In to Comment