Skip to content

Commit 1c9322c

Browse files
committed
refactor: 脚本降级改用 || 符号
1 parent 7abbaa7 commit 1c9322c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/BootstrapBlazor/Components/Typed/Typed.razor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import Typed from '../../lib/typedjs/typed.module.js'
33

44
const getOptions = (text, invoke, options, callbacks) => {
5-
options ||= {};
5+
options = options || {};
66

77
if (text) {
88
options.strings = [text];

src/BootstrapBlazor/wwwroot/modules/fullscreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
export async function toggle(options) {
44
let el = null;
5-
options ||= {};
5+
options = options || {};
66
if (options.id) {
77
el = document.getElementById(options.id);
88
}

src/BootstrapBlazor/wwwroot/modules/utility.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,8 @@ const deepMerge = (obj1, obj2, skipNull = true) => {
809809
}
810810

811811
export function registerBootstrapBlazorModule(name, identifier, callback) {
812-
window.BootstrapBlazor ||= {};
813-
window.BootstrapBlazor[name] ||= {
812+
window.BootstrapBlazor = window.BootstrapBlazor || {};
813+
window.BootstrapBlazor[name] = window.BootstrapBlazor[name] || {
814814
_init: false,
815815
_items: [],
816816
register: function (id, cb) {

0 commit comments

Comments
 (0)