diff --git a/deps/chakrashim/src/jsrtinspectorhelpers.cc b/deps/chakrashim/src/jsrtinspectorhelpers.cc index 1bf415f7880..e16832a0086 100644 --- a/deps/chakrashim/src/jsrtinspectorhelpers.cc +++ b/deps/chakrashim/src/jsrtinspectorhelpers.cc @@ -22,6 +22,7 @@ #include "v8chakra.h" #include "jsrtinspectorhelpers.h" +#include "jsrtutils.h" namespace jsrt { static const int JsrtDebugPropertyAttributeReadOnly = 4; @@ -59,6 +60,13 @@ namespace jsrt { JsValueRef sourceVal = nullptr; IfJsErrorRet(JsGetProperty(sourceObj, propId, &sourceVal)); + bool isUndefined; + IfJsErrorRet(jsrt::IsUndefined(sourceVal, &isUndefined)); + + if (isUndefined) { + return JsNoError; + } + JsValueRef destVal = nullptr; if (convertFunc != nullptr) { IfJsErrorRet(convertFunc(sourceVal, &destVal));