Skip to content

Commit

Permalink
Fix getting user and tweet info from React state
Browse files Browse the repository at this point in the history
Fixes getting quote tweet/retweet/like counts for focused tweets and follower counts for hiding/showing blue check replies

Closes #543
  • Loading branch information
insin committed Apr 8, 2024
1 parent 52bc8fd commit b9ff45a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ function getElement(selector, {
function getStateEntities() {
let reactRootContainer = ($reactRoot?.wrappedJSObject ? $reactRoot.wrappedJSObject : $reactRoot)?._reactRootContainer
if (reactRootContainer) {
let entities = reactRootContainer._internalRoot?.current?.memoizedState?.element?.props?.children?.props?.store?.getState()?.entities
let entities = reactRootContainer.current?.memoizedState?.element?.props?.children?.props?.store?.getState()?.entities
if (entities) {
return entities
} else {
Expand Down

0 comments on commit b9ff45a

Please sign in to comment.