mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-10 04:50:53 +01:00
Fix rare issue with missing views value
This commit is contained in:
parent
0d88de2d86
commit
50c48511a1
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ export const buildAPITwitterStatus = async (
|
||||||
|
|
||||||
apiStatus.possibly_sensitive = status.legacy.possibly_sensitive;
|
apiStatus.possibly_sensitive = status.legacy.possibly_sensitive;
|
||||||
|
|
||||||
if (status.views.state === 'EnabledWithCount') {
|
if (status.views?.state === 'EnabledWithCount') {
|
||||||
apiStatus.views = parseInt(status.views.count || '0') ?? null;
|
apiStatus.views = parseInt(status.views.count || '0') ?? null;
|
||||||
} else {
|
} else {
|
||||||
apiStatus.views = null;
|
apiStatus.views = null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue