Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary Removes one liner non-null-assert. Instead of this line: ```ts if (rule != null && spacesApi && outcome === 'conflict') { ``` We just check using the `?` operator and type narrowing to remove the possibility of an error ```ts if (rule?.alias_target_id != null && spacesApi && rule.outcome === 'conflict') { ``` The `rule?.alias_target_id != null` ensures that both `rule` and `alias_target_id` are not `null/undefined` Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
- Loading branch information