Skip to content

Commit

Permalink
Fix: Canceling load early returns error
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikKalkoken committed Nov 2, 2024
1 parent 48f1f16 commit efbe35a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FyneApp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Website = "https://github.com/ErikKalkoken/janice"
Icon = "icon.png"
Name = "Janice"
ID = "io.github.erikkalkoken.janice"
Version = "0.6.0"
Version = "0.6.1"
Build = 1

[Release]
Expand Down
3 changes: 3 additions & 0 deletions internal/jsondocument/jsondocument.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ func (j *JSONDocument) Value(uid widget.TreeNodeID) Node {
func (j *JSONDocument) Load(ctx context.Context, reader fyne.URIReadCloser, progressInfo binding.Untyped) error {
j.progressInfo = progressInfo
data, err := j.load(ctx, reader)
if errors.Is(err, context.Canceled) {
err = ErrCallerCanceled
}
if err != nil {
return err
}
Expand Down

0 comments on commit efbe35a

Please sign in to comment.