Skip to content

Commit e461fef

Browse files
committed
fix(editor): update Zag image picker machine usage for compatibility with latest API
1 parent fc9c814 commit e461fef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

resources/assets/editor/components/ImagePicker.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
const uploadingImages = ref<Image[]>([]);
4646
const currentValue = ref<Image>();
4747
48-
const [state, send] = useMachine(machine({
48+
const service = useMachine(machine, {
4949
id: "imagepicker",
5050
accept: "image/*",
5151
maxFiles: 10,
@@ -74,9 +74,9 @@
7474
onImageSelect(store.images[0]);
7575
})
7676
},
77-
}));
77+
});
7878
79-
const fileUpload = computed(() => connect(state.value, send, normalizeProps));
79+
const fileUpload = computed(() => connect(service, normalizeProps));
8080
8181
function onImageSelect(image: Image) {
8282
model.value = image;

0 commit comments

Comments
 (0)