[Vuejs]-Vue 3 Composable console error: TypeError: Cannot read properties of undefined (reading 'isError')

0👍

This was fixed by initalizing the non-optional imageUpload properties.

So delete this line:

let imageUpload: Ref<ImageUpload>;

And replace it with this:

let imageUpload = ref<ImageUpload>({
  isCanceled: false,
  isRunning: false,
  isPaused: false,
  isSuccess: false,
  isError: false,
});

Leave a comment