Skip to content

Commit de95dd9

Browse files
committed
fix: operation.actions may be undefined
1 parent 99bfe58 commit de95dd9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

0 commit comments

Comments
 (0)