fix: ALT text entered in the compose dialog is erased when you press "Edit" again (#1054)

zio/stable
GitStart 2023-07-25 17:47:26 +03:00 committed by GitHub
parent 806be6f722
commit c1580dae1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ export const Component = observer(function ({image, gallery}: Props) {
const [position, setPosition] = useState<Position | undefined>( const [position, setPosition] = useState<Position | undefined>(
image.attributes.position, image.attributes.position,
) )
const [altText, setAltText] = useState('') const [altText, setAltText] = useState(image?.altText ?? '')
const onFlipHorizontal = useCallback(() => { const onFlipHorizontal = useCallback(() => {
image.flipHorizontal() image.flipHorizontal()