Skip to content

Commit

Permalink
Update the function
Browse files Browse the repository at this point in the history
  • Loading branch information
poorna2152 committed Apr 18, 2024
1 parent b1e6181 commit 5a17e31
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions examples/alternate-receive/alternate_receive.bal
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,5 @@ function fetch(string url) returns json|error {
return payload["args"];
}

function getJsonProperty(json|error data) returns json|error? {
if data is error {
return data.message();
}
return data.'worker;
}
function getJsonProperty(json|error data) returns json|error? =>
data is error ? data.message() : data.'worker;

0 comments on commit 5a17e31

Please sign in to comment.