diff --git a/lib/config/vmops.hpp b/lib/config/vmops.hpp index 1db10e009..0f517aa8e 100644 --- a/lib/config/vmops.hpp +++ b/lib/config/vmops.hpp @@ -58,7 +58,7 @@ public: { boost::shared_ptr vframe; - if (!self.IsEmpty()) + if (!self.IsEmpty() || self.IsString()) vframe = boost::make_shared(self); /* passes self to the callee using a TLS variable */ else vframe = boost::make_shared(); @@ -206,7 +206,7 @@ public: static inline Value GetField(const Value& context, const String& field, const DebugInfo& debugInfo = DebugInfo()) { - if (context.IsEmpty()) + if (context.IsEmpty() && !context.IsString()) return Empty; if (!context.IsObject())