Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Parse/Platform/Objects/ParseObjectClassController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public ParseObject Instantiate(string className, IServiceHub serviceHub)
Classes.TryGetValue(className, out ParseObjectClass info);
Mutex.ExitReadLock();

serviceHub = serviceHub ?? ParseClient.Instance;
Copy link
Member

@mtrezza mtrezza Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks suspicious. Why don't we just always use ParseClient.Instance if we know it cannot be null? What is the diff between serviceHub and ParseClient.Instance?

return info is { } ? info.Instantiate().Bind(serviceHub) : new ParseObject(className, serviceHub);
}

Expand Down