aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-05-07 00:21:03 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-05-07 00:21:03 -0400
commit5ffd715a2ce6c25daff22410ed9b6b009e8938d3 (patch)
tree47d6fbb47263bcaf616414f5d2f9e01e975aeb9d /src
parent337335bc3f7daa61ca9116feaec85882ffd0853a (diff)
playing with templates for text. weird stuff happens 50% of the time with text typing backward.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/DocumentDecorations.tsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 693d6ec55..e2f445874 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -78,11 +78,15 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
if (SelectionManager.SelectedDocuments().length > 0) {
let field = SelectionManager.SelectedDocuments()[0].props.Document[this._fieldKey];
if (typeof field === "number") {
- SelectionManager.SelectedDocuments().forEach(d =>
- d.props.Document[this._fieldKey] = +this._title);
+ SelectionManager.SelectedDocuments().forEach(d => {
+ let doc = d.props.Document.proto ? d.props.Document.proto : d.props.Document;
+ doc[this._fieldKey] = +this._title;
+ });
} else {
- SelectionManager.SelectedDocuments().forEach(d =>
- d.props.Document[this._fieldKey] = this._title);
+ SelectionManager.SelectedDocuments().forEach(d => {
+ let doc = d.props.Document.proto ? d.props.Document.proto : d.props.Document;
+ doc[this._fieldKey] = this._title;
+ });
}
}
}