diff --git a/packages/editor/src/core/extensions/custom-image/components/upload-status.tsx b/packages/editor/src/core/extensions/custom-image/components/upload-status.tsx index 8492d5194..7b23713e9 100644 --- a/packages/editor/src/core/extensions/custom-image/components/upload-status.tsx +++ b/packages/editor/src/core/extensions/custom-image/components/upload-status.tsx @@ -12,7 +12,7 @@ export const ImageUploadStatus: React.FC = (props) => { // Displayed status that will animate smoothly const [displayStatus, setDisplayStatus] = useState(0); // Animation frame ID for cleanup - const animationFrameRef = useRef(null); + const animationFrameRef = useRef(null); // subscribe to image upload status const uploadStatus: number | undefined = useEditorState({ editor, @@ -41,7 +41,7 @@ export const ImageUploadStatus: React.FC = (props) => { }; animationFrameRef.current = requestAnimationFrame((time) => animation(time)); }; - animateToValue(displayStatus, uploadStatus, performance.now()); + animateToValue(displayStatus, uploadStatus == undefined ? 100 : uploadStatus, performance.now()); return () => { if (animationFrameRef.current) { diff --git a/space/helpers/editor.helper.ts b/space/helpers/editor.helper.ts index 0907b421e..5126b99c7 100644 --- a/space/helpers/editor.helper.ts +++ b/space/helpers/editor.helper.ts @@ -59,7 +59,7 @@ export const getEditorFileHandlers = (args: TArgs): TFileHandler => { anchor, workspaceId, }), - getAssetUploadStatus: () => 0, + assetsUploadStatus: {}, upload: uploadFile, delete: async (src: string) => { if (src?.startsWith("http")) {