File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ export class Evaluator {
309309 return reject ( new Error ( response . error ) ) ;
310310 }
311311
312- return resolve ( response . result ) ;
312+ return resolve ( response . result . code ) ;
313313 }
314314 } ;
315315
Original file line number Diff line number Diff line change @@ -79,12 +79,7 @@ export class EvalSocket {
7979 ) ;
8080 }
8181
82- if (
83- ! data ?. id ||
84- typeof data . id !== 'string' ||
85- ! data ?. code ||
86- typeof data . code !== 'string'
87- ) {
82+ if ( ! data ?. id || typeof data . id !== 'string' ) {
8883 return this . send (
8984 client ,
9085 { error : 'Invalid or missing ID.' } ,
@@ -100,6 +95,14 @@ export class EvalSocket {
10095 return awaiter . resolve ( data ) ;
10196 }
10297
98+ if ( ! data ?. code || typeof data . code !== 'string' ) {
99+ return this . send (
100+ client ,
101+ { error : 'Invalid or missing ID.' } ,
102+ EventCode . MALFORMED_DATA ,
103+ ) ;
104+ }
105+
103106 const response = await this . handleEvalRequest ( data . code , data . msg ) ;
104107 this . send ( client , {
105108 ...response ,
You can’t perform that action at this time.
0 commit comments