rettiwt-api 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,11 +25,11 @@ var CursoredData = /** @class */ (function () {
|
|
|
25
25
|
for (var _i = 0, list_1 = list; _i < list_1.length; _i++) {
|
|
26
26
|
var item = list_1[_i];
|
|
27
27
|
// If the item is a valid raw tweet
|
|
28
|
-
if (item.__typename == 'Tweet' && item.rest_id) {
|
|
28
|
+
if (item && item.__typename == 'Tweet' && item.rest_id) {
|
|
29
29
|
this.list.push(new Tweet_1.Tweet(item));
|
|
30
30
|
}
|
|
31
31
|
// If the item is a valid raw user
|
|
32
|
-
else if (item.__typename == 'User' && item.rest_id && item.id) {
|
|
32
|
+
else if (item && item.__typename == 'User' && item.rest_id && item.id) {
|
|
33
33
|
this.list.push(new User_1.User(item));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CursoredData.js","sourceRoot":"","sources":["../../src/models/CursoredData.ts"],"names":[],"mappings":";;;AAGA,SAAS;AACT,iCAAgC;AAChC,+BAA8B;AAK9B;;;;;;GAMG;AACH;IAOC;;;OAGG;IACH,sBAAY,IAAmC,EAAE,IAAiB;QAAtD,qBAAA,EAAA,SAAmC;QAAE,qBAAA,EAAA,SAAiB;QAVlE,0CAA0C;QAC1C,SAAI,GAAQ,EAAE,CAAC;QAUd,8DAA8D;QAC9D,KAAmB,UAAI,EAAJ,aAAI,EAAJ,kBAAI,EAAJ,IAAI,EAAE;YAApB,IAAM,IAAI,aAAA;YACd,mCAAmC;YACnC,IAAI,IAAI,CAAC,UAAU,IAAI,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"CursoredData.js","sourceRoot":"","sources":["../../src/models/CursoredData.ts"],"names":[],"mappings":";;;AAGA,SAAS;AACT,iCAAgC;AAChC,+BAA8B;AAK9B;;;;;;GAMG;AACH;IAOC;;;OAGG;IACH,sBAAY,IAAmC,EAAE,IAAiB;QAAtD,qBAAA,EAAA,SAAmC;QAAE,qBAAA,EAAA,SAAiB;QAVlE,0CAA0C;QAC1C,SAAI,GAAQ,EAAE,CAAC;QAUd,8DAA8D;QAC9D,KAAmB,UAAI,EAAJ,aAAI,EAAJ,kBAAI,EAAJ,IAAI,EAAE;YAApB,IAAM,IAAI,aAAA;YACd,mCAAmC;YACnC,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU,IAAI,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE;gBACvD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,aAAK,CAAC,IAAiB,CAAM,CAAC,CAAC;aAClD;YACD,kCAAkC;iBAC7B,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,IAAI,IAAI,CAAC,OAAO,IAAK,IAAiB,CAAC,EAAE,EAAE;gBACpF,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,WAAI,CAAC,IAAgB,CAAM,CAAC,CAAC;aAChD;SACD;QAED,uBAAuB;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IACF,mBAAC;AAAD,CAAC,AA3BD,IA2BC;AA3BY,oCAAY;AA6BzB;;;;GAIG;AACH;IAIC;;;;OAIG;IACH,gBAAY,SAAiB;QAC5B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IACxB,CAAC;IACF,aAAC;AAAD,CAAC,AAZD,IAYC;AAZY,wBAAM"}
|
package/package.json
CHANGED
|
@@ -30,11 +30,11 @@ export class CursoredData<T extends Tweet | User> implements ICursoredData<T> {
|
|
|
30
30
|
// Deserializing the input raw data and storing it in the list
|
|
31
31
|
for (const item of list) {
|
|
32
32
|
// If the item is a valid raw tweet
|
|
33
|
-
if (item.__typename == 'Tweet' && item.rest_id) {
|
|
33
|
+
if (item && item.__typename == 'Tweet' && item.rest_id) {
|
|
34
34
|
this.list.push(new Tweet(item as IRawTweet) as T);
|
|
35
35
|
}
|
|
36
36
|
// If the item is a valid raw user
|
|
37
|
-
else if (item.__typename == 'User' && item.rest_id && (item as IRawUser).id) {
|
|
37
|
+
else if (item && item.__typename == 'User' && item.rest_id && (item as IRawUser).id) {
|
|
38
38
|
this.list.push(new User(item as IRawUser) as T);
|
|
39
39
|
}
|
|
40
40
|
}
|