diff --git a/lib/config/vmops.hpp b/lib/config/vmops.hpp index e4cde9f26..8160dad8c 100644 --- a/lib/config/vmops.hpp +++ b/lib/config/vmops.hpp @@ -91,7 +91,7 @@ public: { ScriptFrame vframe; - if (!self.IsEmpty()) + if (!self.IsEmpty() || self.IsString()) vframe.Self = self; return func->Invoke(arguments); @@ -231,7 +231,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())