aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextSchema.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-12-16 10:40:45 -0500
committerbob <bcz@cs.brown.edu>2019-12-16 10:40:45 -0500
commit9c3acfbd6ad518cd1afcc05a521480d93c07f13a (patch)
treea6c6bbbfc2250e7c6d1f1d4b9757e55128597edf /src/client/util/RichTextSchema.tsx
parent7584c5bed0de45f2f656fb289ff67463fb1958ef (diff)
parent001cea83f6c57914e0e76a75a94f3e06e542a419 (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.tsx6
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](), () => {