diff options
author | bobzel <zzzman@gmail.com> | 2024-10-01 15:48:45 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-10-01 15:48:45 -0400 |
commit | fe3c2d841b8c112f7f22ac9f7209d46b0c6b9669 (patch) | |
tree | 5138e810a057a4825f8a3c58285f14036a208c6b | |
parent | b56d2c2ae115e81fbf7aeaae0d2fed9ba073f11d (diff) |
fixed saving to anno palette.
-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; |