Skip to content

Commit aaf0a58

Browse files
use save calling syntax
1 parent f6bdf7b commit aaf0a58

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/ruby_ui/dialog/dialog_controller.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export default class extends Controller {
1717
}
1818

1919
open(e) {
20-
if (e) {
21-
e.preventDefault();
22-
}
20+
e?.preventDefault();
2321
document.body.insertAdjacentHTML('beforeend', this.contentTarget.innerHTML)
2422
// prevent scroll on body
2523
document.body.classList.add('overflow-hidden')

0 commit comments

Comments
 (0)