Skip to content

Commit 4c24dda

Browse files
committed
refactor: 精简代码逻辑
1 parent e0a644d commit 4c24dda

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/BootstrapBlazor/wwwroot/modules/fullscreen.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
export async function toggle(options) {
44
let el = null;
5-
options = options || {};
6-
if (options.id) {
5+
if (options?.id) {
76
el = document.getElementById(options.id);
87
}
9-
else if (options.element && isElement(options.element)) {
8+
else if (options?.element && isElement(options.element)) {
109
el = options.element;
1110
}
1211
else {

0 commit comments

Comments
 (0)