fix(editor): sentry-17da76f65b91465b911fad44279d971a (#9315)
This commit is contained in:
@@ -203,6 +203,8 @@ export function getTextWidth(text: string, font: string): number {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function wrapTextDeltas(text: Y.Text, font: string, w: number) {
|
export function wrapTextDeltas(text: Y.Text, font: string, w: number) {
|
||||||
|
if (!text) return [];
|
||||||
|
|
||||||
const deltas: TextDelta[] = (text.toDelta() as TextDelta[]).flatMap(
|
const deltas: TextDelta[] = (text.toDelta() as TextDelta[]).flatMap(
|
||||||
delta => ({
|
delta => ({
|
||||||
insert: wrapText(delta.insert, font, w),
|
insert: wrapText(delta.insert, font, w),
|
||||||
|
|||||||
Reference in New Issue
Block a user