diff options
| author | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-07-07 14:09:55 -0700 |
|---|---|---|
| committer | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-07-07 14:09:55 -0700 |
| commit | 27776ca049cd68072b169607fcf3776cc07e3c60 (patch) | |
| tree | a46753d12ff72466577958d2823f1bb727600604 /src/client/views/nodes/formattedText/RichTextMenu.tsx | |
| parent | 2961955e2e6ee993252435f0e1358b305c0817b3 (diff) | |
| parent | 1442a7769becaec7aeaae437c6eae9107ec90750 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into new_audio
Diffstat (limited to 'src/client/views/nodes/formattedText/RichTextMenu.tsx')
| -rw-r--r-- | src/client/views/nodes/formattedText/RichTextMenu.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx index 9075a6486..f10c425d4 100644 --- a/src/client/views/nodes/formattedText/RichTextMenu.tsx +++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx @@ -219,7 +219,7 @@ export default class RichTextMenu extends AntimodeMenu { getActiveAlignment() { if (this.view) { const path = (this.view.state.selection.$from as any).path; - for (let i = path.length - 3; i < path.length; i -= 3) { + for (let i = path.length - 3; i < path.length && i >= 0; i -= 3) { if (path[i]?.type === this.view.state.schema.nodes.paragraph) { return path[i].attrs.align || "left"; } |
