Skip to content

Commit

Permalink
Add additional checks on required parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
marchbold committed Oct 16, 2021
1 parent eccc1ba commit f7a148e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/com/apm/data/packages/PackageParameter.as
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ package com.apm.data.packages
else
{
if (data.hasOwnProperty( "name" )) this.name = data[ "name" ];
if (data.hasOwnProperty( "required" )) this.required = data[ "required" ];
if (data.hasOwnProperty( "required" )) this.required = (String(data[ "required" ]) == "true" || int(data["required"]) == 1);
if (data.hasOwnProperty( "defaultValue" )) this.defaultValue = data[ "defaultValue" ];
if (data.hasOwnProperty( "default" )) this.defaultValue = data[ "default" ];
}
}
return this;
Expand Down

0 comments on commit f7a148e

Please sign in to comment.