|
@@ -1251,7 +1251,8 @@ Value Identifier::execute(Interpreter& interpreter, GlobalObject& global_object)
|
|
|
|
|
|
auto value = interpreter.vm().get_variable(string(), global_object);
|
|
|
if (value.is_empty()) {
|
|
|
- interpreter.vm().throw_exception<ReferenceError>(global_object, ErrorType::UnknownIdentifier, string());
|
|
|
+ if (!interpreter.exception())
|
|
|
+ interpreter.vm().throw_exception<ReferenceError>(global_object, ErrorType::UnknownIdentifier, string());
|
|
|
return {};
|
|
|
}
|
|
|
return value;
|