Skip to content

Commit

Permalink
fix type guard
Browse files Browse the repository at this point in the history
  • Loading branch information
xpadev-net committed Jun 16, 2022
1 parent a9f92d7 commit 794b8cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ class NiconiComments {
const parseDataStart = performance.now();
let data_: formattedComment[] = [];
for (let i = 0; i < data.length; i++) {
for (let key in data[i]) {
let val = data[i];
if (!val) continue;
let val = data[i];
if (!val) continue;
for (let key in val) {
let value = val[key];
if (isApiChat(value) && value["deleted"] !== 1) {
let tmpParam: any = {
Expand Down Expand Up @@ -1139,7 +1139,7 @@ const replaceAll = (string: string, target: string, replace: string) => {
return string;
}
const isApiChat = (item: any): item is apiChat =>
!!item.chat
item.id&&item.vpos&&item.vpos

const logger = (msg: any) => {
if (isDebug) console.debug(msg);
Expand Down

0 comments on commit 794b8cb

Please sign in to comment.