mirror of
https://github.com/atom/atom.git
synced 2026-02-07 21:25:05 -05:00
🎨 DS207 Use shorter variations of null checks
This commit is contained in:
@@ -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 `<span class="keystroke">${humanizeKeystrokes(bindings[0].keystrokes)}</span>`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user