Showing
1 changed file
with
4 additions
and
4 deletions
| @@ -221,7 +221,7 @@ class CommentViewModel { | @@ -221,7 +221,7 @@ class CommentViewModel { | ||
| 221 | 221 | ||
| 222 | 222 | ||
| 223 | //子评论 | 223 | //子评论 |
| 224 | - if (element.childComments.length) { | 224 | + if (element.childComments) { |
| 225 | for (const obj2 of element.childComments) { | 225 | for (const obj2 of element.childComments) { |
| 226 | if ((obj2.id + '').length > 0) { | 226 | if ((obj2.id + '').length > 0) { |
| 227 | commentIDs.push(obj2.id + '') | 227 | commentIDs.push(obj2.id + '') |
| @@ -267,7 +267,7 @@ class CommentViewModel { | @@ -267,7 +267,7 @@ class CommentViewModel { | ||
| 267 | if (element.commentId == commentModel.id) { | 267 | if (element.commentId == commentModel.id) { |
| 268 | commentModel.api_status = element.status | 268 | commentModel.api_status = element.status |
| 269 | } | 269 | } |
| 270 | - if (commentModel.childComments.length) { | 270 | + if (commentModel.childComments) { |
| 271 | for (const childCommentModel of commentModel.childComments) { | 271 | for (const childCommentModel of commentModel.childComments) { |
| 272 | if (element.commentId == childCommentModel.id) { | 272 | if (element.commentId == childCommentModel.id) { |
| 273 | childCommentModel.api_status = element.status | 273 | childCommentModel.api_status = element.status |
| @@ -310,7 +310,7 @@ class CommentViewModel { | @@ -310,7 +310,7 @@ class CommentViewModel { | ||
| 310 | if (element.userId == commentModel.fromUserId) { | 310 | if (element.userId == commentModel.fromUserId) { |
| 311 | commentModel.api_levelHead = element.levelHead | 311 | commentModel.api_levelHead = element.levelHead |
| 312 | } | 312 | } |
| 313 | - if (commentModel.childComments.length) { | 313 | + if (commentModel.childComments) { |
| 314 | for (const childCommentModel of commentModel.childComments) { | 314 | for (const childCommentModel of commentModel.childComments) { |
| 315 | if (element.userId == childCommentModel.fromUserId) { | 315 | if (element.userId == childCommentModel.fromUserId) { |
| 316 | childCommentModel.api_levelHead = element.levelHead | 316 | childCommentModel.api_levelHead = element.levelHead |
| @@ -356,7 +356,7 @@ class CommentViewModel { | @@ -356,7 +356,7 @@ class CommentViewModel { | ||
| 356 | if (element.creatorId == commentModel.fromCreatorId) { | 356 | if (element.creatorId == commentModel.fromCreatorId) { |
| 357 | commentModel.api_authIcon = element.authIcon | 357 | commentModel.api_authIcon = element.authIcon |
| 358 | } | 358 | } |
| 359 | - if (commentModel.childComments.length) { | 359 | + if (commentModel.childComments) { |
| 360 | for (const childCommentModel of commentModel.childComments) { | 360 | for (const childCommentModel of commentModel.childComments) { |
| 361 | if (element.creatorId == childCommentModel.fromCreatorId) { | 361 | if (element.creatorId == childCommentModel.fromCreatorId) { |
| 362 | childCommentModel.api_authIcon = element.authIcon | 362 | childCommentModel.api_authIcon = element.authIcon |
-
Please register or login to post a comment