Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
Fix error checking with Unity 2017.1
Browse files Browse the repository at this point in the history
Unity 2017.1 apparently returns an empty string instead of null. Fix #73.
  • Loading branch information
DanielJMus authored and loicteixeira committed Jul 19, 2017
1 parent a34798e commit 6f05ede
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Plugins/GameJolt/Scripts/API/Core/Response.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public Response(string errorMessage) {
/// <param name="format">The format of the response.</param>
public Response(WWW www, ResponseFormat format = ResponseFormat.Json)
{
if (www.error != null)
if (!string.IsNullOrEmpty(www.error))
{
this.success = false;
Debug.LogWarning(www.error);
Expand Down

2 comments on commit 6f05ede

@hworld
Copy link

@hworld hworld commented on 6f05ede Aug 4, 2017

Choose a reason for hiding this comment

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

Ha! I was trying to find someone to fix it for 2017, but then came here and saw this. Thanks so much @DanielJMus and @loicteixeira !

@loicteixeira
Copy link
Owner

Choose a reason for hiding this comment

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

That's really @DanielJMus to thanks, all I did was merge his PR (his first ever PR so double congratz).

As for the fix, it has been released in 2.1.3.

Please sign in to comment.