diff --git a/src/jsrs_parser.cc b/src/jsrs_parser.cc index 53f36d0..3aa1177 100644 --- a/src/jsrs_parser.cc +++ b/src/jsrs_parser.cc @@ -681,6 +681,11 @@ Local ParseArray(Isolate* isolate, } } + if (is_empty) { + THROW_EXCEPTION(SyntaxError, "Invalid format in array"); + return Undefined(isolate); + } + return array; }