Ver código fonte

fix: buffer not return event show errors (#149)

tags/0.2.2
Joel 2 anos atrás
pai
commit
2d0d3365ed
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      web/service/base.ts

+ 1
- 1
web/service/base.ts Ver arquivo

@@ -78,7 +78,7 @@ const handleStream = (response: any, onData: IOnData, onCompleted?: IOnCompleted
if (message.startsWith('data: ')) { // check if it starts with data:
// console.log(message);
bufferObj = JSON.parse(message.substring(6)) // remove data: and parse as json
if (bufferObj.status === 400) {
if (bufferObj.status === 400 || !bufferObj.event) {
onData('', false, {
conversationId: undefined,
messageId: '',

Carregando…
Cancelar
Salvar