Skip to content
Snippets Groups Projects
Commit 90dda613 authored by Jono Wenger's avatar Jono Wenger
Browse files

Fix bug where web worker would not send response when creating a new database successfully

parent 676e9bde
Branches
Tags
1 merge request!67fix for latest client release
......@@ -77,7 +77,7 @@ func (m *manager) newWASMEventModelCB(data []byte) ([]byte, error) {
return []byte(err.Error()), nil
}
return nil, nil
return []byte{}, nil
}
// messageReceivedCallback sends calls to the channels.MessageReceivedCallback
......
......@@ -74,7 +74,7 @@ func (m *manager) newWASMEventModelCB(data []byte) ([]byte, error) {
return []byte(err.Error()), nil
}
return nil, nil
return []byte{}, nil
}
// messageReceivedCallback sends calls to the MessageReceivedCallback in the
......
......@@ -121,7 +121,7 @@ func NewWASMEventModel(path, wasmJsPath string, encryption cryptoChannel.Cipher,
select {
case data := <-dataChan:
if data != nil {
if len(data) > 0 {
return nil, errors.New(string(data))
}
case <-time.After(worker.ResponseTimeout):
......
......@@ -89,7 +89,7 @@ func NewWASMEventModel(path, wasmJsPath string, encryption cryptoChannel.Cipher,
select {
case data := <-dataChan:
if data != nil {
if len(data) > 0 {
return nil, errors.New(string(data))
}
case <-time.After(worker.ResponseTimeout):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment