mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 22:17:45 +00:00
Make sure modifiers exist before deserializing
This commit is contained in:
parent
419012f6e5
commit
e036a69cf9
1 changed files with 2 additions and 1 deletions
|
@ -32,7 +32,8 @@ namespace Sapphire::World::Action
|
|||
inline void from_json( const nlohmann::json& j, StatusEntry& statusEntry )
|
||||
{
|
||||
j.at( "id" ).get_to( statusEntry.id );
|
||||
j.at( "modifiers" ).get_to( statusEntry.modifiers );
|
||||
if( j.contains( "modifiers" ) )
|
||||
j.at( "modifiers" ).get_to( statusEntry.modifiers );
|
||||
}
|
||||
|
||||
inline void from_json( const nlohmann::json& j, ActionEntry& action )
|
||||
|
|
Loading…
Add table
Reference in a new issue