From 4179b11cb9142ef69d4b0d4464fda06f0a992641 Mon Sep 17 00:00:00 2001 From: Jason Rudolph Date: Mon, 23 Oct 2017 09:32:20 -0400 Subject: [PATCH] :art: DS207 Use shorter variations of null checks --- src/tooltip-manager.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/tooltip-manager.js b/src/tooltip-manager.js index 89849020c..a27b860b0 100644 --- a/src/tooltip-manager.js +++ b/src/tooltip-manager.js @@ -1,8 +1,3 @@ -/* - * decaffeinate suggestions: - * DS207: Consider shorter variations of null checks - * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md - */ const _ = require('underscore-plus') const {Disposable, CompositeDisposable} = require('event-kit') let Tooltip = null @@ -198,7 +193,7 @@ const humanizeKeystrokes = function (keystroke) { } var getKeystroke = function (bindings) { - if (bindings != null ? bindings.length : undefined) { + if (bindings && bindings.length) { return `${humanizeKeystrokes(bindings[0].keystrokes)}` } }