fix: 내 정보 로그 추가 불러오기 안되는 문제 수정

This commit is contained in:
2021-09-10 21:05:26 +09:00
parent 2012bbdbc1
commit 4e642fe3d3
+3 -2
View File
@@ -9,7 +9,7 @@ import { unwrap_any } from './util/unwrap_any';
type LogResponse = { type LogResponse = {
result: true; result: true;
log: Record<number, string>; log: Record<string, string>;
}; };
$(function ($) { $(function ($) {
@@ -92,10 +92,11 @@ $(function ($) {
} }
const html: string[] = []; const html: string[] = [];
for (const [key, item] of Object.entries(result.log)) { for (const key of Object.values(keys)) {
if ($(`#log_${logType}_${key}`).length) { if ($(`#log_${logType}_${key}`).length) {
return true; return true;
} }
const item = result.log[key];
html.push(`<div class='log_${logType}' id='log_${logType}_${key}' data-seq='${key}'>${item}</div>`); html.push(`<div class='log_${logType}' id='log_${logType}_${key}' data-seq='${key}'>${item}</div>`);
} }
$(`#${logType}Plate`).append(html.join('')); $(`#${logType}Plate`).append(html.join(''));