Skip to content

Commit

Permalink
Simplify our capabilities stub assignment
Browse files Browse the repository at this point in the history
This is more legible but still gets the point across; the intermediate
variable was explicit but ultimately unnnecessary.
  • Loading branch information
rylnd committed Jul 14, 2020
1 parent 234aa9b commit 1614f03
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ export function getModulesProvider({
) {
let hasMlCapabilities: HasMlCapabilities;
if (request.params === 'DummyKibanaRequest') {
const hasMlCapabilitiesStub = () => Promise.resolve();
hasMlCapabilities = hasMlCapabilitiesStub;
hasMlCapabilities = () => Promise.resolve();
} else {
hasMlCapabilities = getHasMlCapabilities(request);
}
Expand Down

0 comments on commit 1614f03

Please sign in to comment.