diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/smartdraw/AnnotationPalette.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/smartdraw/AnnotationPalette.tsx b/src/client/views/smartdraw/AnnotationPalette.tsx index 4421547be..1c17469c3 100644 --- a/src/client/views/smartdraw/AnnotationPalette.tsx +++ b/src/client/views/smartdraw/AnnotationPalette.tsx @@ -10,7 +10,7 @@ import { returnEmptyFilter, returnFalse, returnTrue } from '../../../ClientUtils import { emptyFunction } from '../../../Utils'; import { Doc, DocListCast, returnEmptyDoclist } from '../../../fields/Doc'; import { DocData } from '../../../fields/DocSymbols'; -import { ImageCast } from '../../../fields/Types'; +import { ImageCast, NumCast } from '../../../fields/Types'; import { DocumentType } from '../../documents/DocumentTypes'; import { Docs } from '../../documents/Documents'; import { makeUserTemplateButtonOrImage } from '../../util/DropConverter'; @@ -178,7 +178,7 @@ export class AnnotationPalette extends ObservableReactComponent<AnnotationPalett * presses the "save drawing" button. */ saveDrawing = async () => { - const cIndex: number = this._props.Document.carousel_index as number; + const cIndex = NumCast(this._props.Document.carousel_index); const focusedDrawing = DocListCast(this._props.Document.data)[cIndex]; const docData = focusedDrawing[DocData]; docData.title = this._opts.text.match(/^(.*?)~~~.*$/)?.[1] || this._opts.text; |