Skip to content

Commit

Permalink
Fix image double change bug (#6146)
Browse files Browse the repository at this point in the history
* fix test

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
2 people authored and dawoodkhan82 committed Oct 30, 2023
1 parent 1aa5eea commit fbbed83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/cool-ties-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/image": patch
"gradio": patch
---

fix:Fix image double change bug
2 changes: 1 addition & 1 deletion js/image/Index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
share: ShareData;
}>;
$: value, gradio.dispatch("change");
$: value?.url && gradio.dispatch("change");
let dragging: boolean;
$: value = !value ? null : value;
Expand Down
1 change: 0 additions & 1 deletion js/image/shared/ImagePreview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import type { I18nFormatter } from "@gradio/utils";
export let value: null | FileData;
// let value_: null | FileData;
export let label: string | undefined = undefined;
export let show_label: boolean;
export let show_download_button = true;
Expand Down

0 comments on commit fbbed83

Please sign in to comment.