mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-03 23:34:09 +02:00
Apparently deserializing @TryMyAwesomeApp sometimes causes a hidden crash
This commit is contained in:
parent
8d1900362e
commit
30a169171a
@ -519,19 +519,21 @@
|
|||||||
TD.services.TwitterUser.prototype.fromJSONObject = function(){
|
TD.services.TwitterUser.prototype.fromJSONObject = function(){
|
||||||
let obj = prevFunc.apply(this, arguments);
|
let obj = prevFunc.apply(this, arguments);
|
||||||
let e = arguments[0].entities;
|
let e = arguments[0].entities;
|
||||||
|
|
||||||
if (obj.id === accountId){
|
if (obj.id === accountId){
|
||||||
obj.name = realDisplayName;
|
obj.name = realDisplayName;
|
||||||
obj.emojifiedName = realDisplayName;
|
obj.emojifiedName = realDisplayName;
|
||||||
obj.profileImageURL = realAvatar;
|
obj.profileImageURL = realAvatar;
|
||||||
obj.url = "https://tweetduck.chylex.com";
|
obj.url = "https://tweetduck.chylex.com";
|
||||||
|
|
||||||
obj.entities.url.urls = [{
|
if (obj.entities && obj.entities.url){
|
||||||
url: obj.url,
|
obj.entities.url.urls = [{
|
||||||
expanded_url: obj.url,
|
url: obj.url,
|
||||||
display_url: "tweetduck.chylex.com",
|
expanded_url: obj.url,
|
||||||
indices: [ 0, 23 ]
|
display_url: "tweetduck.chylex.com",
|
||||||
}];
|
indices: [ 0, 23 ]
|
||||||
|
}];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (e && e.url && e.url.urls && e.url.urls.length && e.url.urls[0].expanded_url){
|
else if (e && e.url && e.url.urls && e.url.urls.length && e.url.urls[0].expanded_url){
|
||||||
obj.url = e.url.urls[0].expanded_url;
|
obj.url = e.url.urls[0].expanded_url;
|
||||||
|
Loading…
Reference in New Issue
Block a user