diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-17 16:38:19 -0800 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-17 16:38:19 -0800 |
commit | 10843071eacf94b237d131a50df9c58352441814 (patch) | |
tree | 854ed4e91131d5f11c4526c0cd24056adf1de2e3 /src/client/util/RichTextSchema.tsx | |
parent | e553c4ac4785ee1d2c57ed5d5303d6dff26929f9 (diff) | |
parent | 96ada41d4c3c411be63bd656da65bba7894a4224 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r-- | src/client/util/RichTextSchema.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx index 543f45731..7a048ed0d 100644 --- a/src/client/util/RichTextSchema.tsx +++ b/src/client/util/RichTextSchema.tsx @@ -741,7 +741,11 @@ export class DashDocView { self._dashDoc = dashDoc; dashDoc.hideSidebar = true; if (node.attrs.width !== dashDoc.width + "px" || node.attrs.height !== dashDoc.height + "px") { - view.dispatch(view.state.tr.setNodeMarkup(getPos(), null, { ...node.attrs, width: dashDoc.width + "px", height: dashDoc.height + "px" })); + try { // bcz: an exception will be thrown if two aliases are open at the same time when a doc view comment is made + view.dispatch(view.state.tr.setNodeMarkup(getPos(), null, { ...node.attrs, width: dashDoc.width + "px", height: dashDoc.height + "px" })); + } catch (e) { + console.log(e); + } } this._reactionDisposer && this._reactionDisposer(); this._reactionDisposer = reaction(() => dashDoc[HeightSym]() + dashDoc[WidthSym](), () => { |