Skip to content

Commit 5b4d5fb

Browse files
jmk89jasongrout
andauthored
Update packages/controls/src/widget_button.ts
Using nullish coalescing operator Co-authored-by: Jason Grout <[email protected]>
1 parent dc81b05 commit 5b4d5fb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/controls/src/widget_button.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@ export class ButtonView extends DOMWidgetView {
106106
const description = this.model.get('description');
107107
const icon = this.model.get('icon');
108108

109-
tooltip
110-
? this.el.setAttribute('title', tooltip)
111-
: this.el.setAttribute('title', description);
109+
this.el.setAttribute('title', tooltip ?? description);
112110

113111
if (description.length || icon.length) {
114112
this.el.textContent = '';

0 commit comments

Comments
 (0)