Clean up terminal hydration promise-chain formatting
This commit is contained in:
parent
088bd37e84
commit
bb1df9b58b
1 changed files with 14 additions and 14 deletions
|
|
@ -5663,14 +5663,14 @@ const useTerminalState = () => {
|
||||||
}
|
}
|
||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then((payload: { data?: OptionPrint[] }) => {
|
.then((payload: { data?: OptionPrint[] }) => {
|
||||||
const next = new Map<string, OptionPrint>();
|
const next = new Map<string, OptionPrint>();
|
||||||
for (const item of payload.data ?? []) {
|
for (const item of payload.data ?? []) {
|
||||||
if (!item || !item.trace_id) {
|
if (!item || !item.trace_id) {
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
next.set(item.trace_id, item);
|
|
||||||
}
|
}
|
||||||
|
next.set(item.trace_id, item);
|
||||||
|
}
|
||||||
if (next.size > 0) {
|
if (next.size > 0) {
|
||||||
setPinnedOptionPrintMap((prev) => upsertPinnedEntries(prev, next, Date.now()));
|
setPinnedOptionPrintMap((prev) => upsertPinnedEntries(prev, next, Date.now()));
|
||||||
}
|
}
|
||||||
|
|
@ -5975,14 +5975,14 @@ const useTerminalState = () => {
|
||||||
}
|
}
|
||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then((payload: { data?: OptionPrint[] }) => {
|
.then((payload: { data?: OptionPrint[] }) => {
|
||||||
const next = new Map<string, OptionPrint>();
|
const next = new Map<string, OptionPrint>();
|
||||||
for (const item of payload.data ?? []) {
|
for (const item of payload.data ?? []) {
|
||||||
if (!item || !item.trace_id) {
|
if (!item || !item.trace_id) {
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
next.set(item.trace_id, item);
|
|
||||||
}
|
}
|
||||||
|
next.set(item.trace_id, item);
|
||||||
|
}
|
||||||
if (next.size > 0) {
|
if (next.size > 0) {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
setPinnedOptionPrintMap((prev) => upsertPinnedEntries(prev, next, now));
|
setPinnedOptionPrintMap((prev) => upsertPinnedEntries(prev, next, now));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue