Skip to content

Commit 6165655

Browse files
Merge pull request #273 from MaaAssistantArknights/dev
Release
2 parents 9812256 + 5eb699e commit 6165655

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2024-04-03
2+
3+
- 修复了因部分作业缺少动作列表而渲染失败的问题
4+
15
## 2024-04-01
26

37
- 添加了作业集功能

src/components/viewer/OperationViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ function OperationViewerInnerDetails({ operation }: { operation: Operation }) {
433433
<div className="col-span-2">
434434
<H4 className="mb-4">动作序列</H4>
435435

436-
{operation.parsedContent.actions.length ? (
436+
{operation.parsedContent.actions?.length ? (
437437
<div className="flex flex-col pb-8">
438438
{operation.parsedContent.actions.map((action, i) => (
439439
<ActionCard action={action} key={i} />

src/models/copilot.schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { OpDifficulty } from './operation'
55
*/
66
export namespace CopilotDocV1 {
77
export interface Operation {
8-
actions: Action[]
8+
actions?: Action[]
99
doc: Doc
1010
groups?: Group[]
1111
minimumRequired: string

src/utils/token-manager.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ export namespace TokenManager {
7070
})()
7171

7272
// reset when finished, so that the next call will trigger a new check
73-
pendingGetToken.finally(() => {
74-
pendingGetToken = undefined
75-
})
73+
pendingGetToken
74+
.finally(() => {
75+
pendingGetToken = undefined
76+
})
77+
// we still need to catch the error here, otherwise it will be unhandled
78+
.catch(noop)
7679

7780
return pendingGetToken
7881
}

0 commit comments

Comments
 (0)