fix(est): apply head cost classification safely
This commit is contained in:
@@ -178,14 +178,21 @@ const EstNative = (() => {
|
||||
const group = (kind === 103 ? heads : costs).get(code);
|
||||
if (!group) throw Error(`하위 자료 없음: ${id}`);
|
||||
active.add(id);
|
||||
const refreshHeadRows =
|
||||
kind === 103
|
||||
? (request.refreshHeadRows || [])
|
||||
.filter((index) => index >= group.start && index < group.start + group.rows.length)
|
||||
.map((index) => index - group.start)
|
||||
: [];
|
||||
const result =
|
||||
kind === 103
|
||||
? EstRows.head(group.rows, options, resolve)
|
||||
? EstRows.head(group.rows, options, resolve, refreshHeadRows)
|
||||
: EstText.calculate(
|
||||
group.rows,
|
||||
options,
|
||||
options.SourceRefresh || options.ResourceTracing ? resolve : () => null,
|
||||
);
|
||||
if (refreshHeadRows.length) request.onHeadRefresh?.(result.refreshErrors);
|
||||
const title = {
|
||||
...tables[sourceTables[kind]].find((row) => row.Code === code),
|
||||
...result.titles[0],
|
||||
|
||||
Reference in New Issue
Block a user