diff options
author | bob <bcz@cs.brown.edu> | 2019-09-19 11:53:47 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-09-19 11:53:47 -0400 |
commit | a07a776e50b4d1789b51731f1e447e7be0ef7dba (patch) | |
tree | 4f96ae5bddd3abd4b6b4bcf90225bb9a7c1cde67 /src | |
parent | 4c0bdf9c38a134a7e669d8c113e10e9cfac6e1a6 (diff) |
fixed type errors
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/MainOverlayTextBox.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/MainOverlayTextBox.tsx b/src/client/views/MainOverlayTextBox.tsx index 115ab6cd5..335cc609f 100644 --- a/src/client/views/MainOverlayTextBox.tsx +++ b/src/client/views/MainOverlayTextBox.tsx @@ -2,7 +2,7 @@ import { action, observable, reaction, trace } from 'mobx'; import { observer } from 'mobx-react'; import "normalize.css"; import * as React from 'react'; -import { Doc, DocListCast } from '../../new_fields/Doc'; +import { Doc, DocListCast, Opt } from '../../new_fields/Doc'; import { BoolCast } from '../../new_fields/Types'; import { emptyFunction, returnTrue, returnZero, Utils, returnOne } from '../../Utils'; import { DragManager } from '../util/DragManager'; @@ -118,8 +118,8 @@ export class MainOverlayTextBox extends React.Component<MainOverlayTextBoxProps> document.removeEventListener('pointerup', this.textBoxUp); } - addDocTab = (doc: Doc, dataDoc: Doc | undefined, location: string) => { - this._textBox && this._textBox.props.addDocTab(doc, dataDoc, location); + addDocTab = (doc: Doc, dataDoc: Opt<Doc>, location: string) => { + return this._textBox && this._textBox.props.addDocTab(doc, dataDoc, location) ? true : false; } render() { this.TextDoc; this.TextDataDoc; |