This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit 0695ae3 authored Feb 6, 2025 · 1 / 5 · Verified
1 parent ff05e43 commit 0695ae3 Copy full SHA for 0695ae3
File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ import type {
4
4
PortableTextMarkDefinition ,
5
5
} from '@portabletext/types'
6
6
7
- import { isPortableTextSpan } from './asserters'
8
- import { sortMarksByOccurences } from './sortMarksByOccurences'
9
- import type { ToolkitNestedPortableTextSpan , ToolkitTextNode } from './types'
7
+ import { isPortableTextSpan } from './asserters'
8
+ import { sortMarksByOccurences } from './sortMarksByOccurences'
9
+ import type { ToolkitNestedPortableTextSpan , ToolkitTextNode } from './types'
10
10
11
11
/**
12
12
* Takes a Portable Text block and returns a nested tree of nodes optimized for rendering
@@ -90,7 +90,7 @@ export function buildMarksTree<M extends PortableTextMarkDefinition = PortableTe
90
90
}
91
91
92
92
for ( const markKey of marksNeeded ) {
93
- const markDef = markDefs . find ( ( def ) => def . _key === markKey )
93
+ const markDef = markDefs ? .find ( ( def ) => def . _key === markKey )
94
94
const markType = markDef ? markDef . _type : markKey
95
95
const node : ToolkitNestedPortableTextSpan < M > = {
96
96
_type : '@span' ,
You can’t perform that action at this time.
0 commit comments