Skip to content

Commit

Permalink
optional chain function call
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
  • Loading branch information
rcebulko and jridgewell authored May 13, 2021
1 parent 0b0a89e commit 1e326ef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/types/object/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ export function tryParseJson(json, opt_onFailed) {
try {
return parseJson(json);
} catch (e) {
if (opt_onFailed) {
opt_onFailed(e);
}
opt_onFailed?.(e);
return null;
}
}
Expand Down

0 comments on commit 1e326ef

Please sign in to comment.