diff --git a/src/ScriptTypes/ScriptType.hpp b/src/ScriptTypes/ScriptType.hpp index 7a3c3dd..764d54c 100644 --- a/src/ScriptTypes/ScriptType.hpp +++ b/src/ScriptTypes/ScriptType.hpp @@ -42,6 +42,11 @@ namespace Porygon{ } virtual bool operator ==(const shared_ptr& b) const{ + if (_class == TypeClass::Nil){ + auto bClass = b->_class; + if (bClass == TypeClass::UserData || bClass == TypeClass::String || bClass == TypeClass::All) + return true; + } return _class == b->_class; }