Skip to content

Commit

Permalink
fix: update uncorrect error use. (#580)
Browse files Browse the repository at this point in the history
* fix: solve nil pointer.

* fix: update uncorrect error use.
  • Loading branch information
mo3et committed Jul 9, 2024
1 parent b33d097 commit 4a678e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wasm/indexdb/version_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ func NewLocalVersionSync() *LocalVersionSync {
func (i *LocalVersionSync) GetVersionSync(ctx context.Context, tableName, entityID string) (*model_struct.LocalVersionSync, error) {
version, err := exec.Exec(tableName, entityID)
if err != nil {
if err == errs.ErrRecordNotFound {
return &model_struct.LocalVersionSync{}, err
}
return nil, err
}
if err == errs.ErrRecordNotFound {
return &model_struct.LocalVersionSync{}, err
}
if v, ok := version.(string); ok {
var temp model_struct.LocalVersionSync
if err := utils.JsonStringToStruct(v, &temp); err != nil {
Expand Down

0 comments on commit 4a678e0

Please sign in to comment.