cast selectable_body and multiselectable to Boolean

This commit is contained in:
Nariman Jelveh 2024-06-18 23:37:28 -07:00
parent 892750788b
commit 41e307bd5b
3 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ function UIItem(options){
options.is_shortcut = options.is_shortcut ?? 0; options.is_shortcut = options.is_shortcut ?? 0;
options.is_trash = options.is_trash ?? false; options.is_trash = options.is_trash ?? false;
options.metadata = options.metadata ?? ''; options.metadata = options.metadata ?? '';
options.multiselectable = options.multiselectable ?? true; options.multiselectable = (options.multiselectable === undefined || options.multiselectable === true) ? true : false;
options.shortcut_to = options.shortcut_to ?? ''; options.shortcut_to = options.shortcut_to ?? '';
options.shortcut_to_path = options.shortcut_to_path ?? ''; options.shortcut_to_path = options.shortcut_to_path ?? '';
options.immutable = (options.immutable === false || options.immutable === 0 || options.immutable === undefined ? 0 : 1); options.immutable = (options.immutable === false || options.immutable === 0 || options.immutable === undefined ? 0 : 1);

View File

@ -99,7 +99,7 @@ async function UIWindow(options) {
options.show_minimize_button = options.show_minimize_button ?? true; options.show_minimize_button = options.show_minimize_button ?? true;
options.on_close = options.on_close ?? undefined; options.on_close = options.on_close ?? undefined;
options.parent_uuid = options.parent_uuid ?? null; options.parent_uuid = options.parent_uuid ?? null;
options.selectable_body = options.selectable_body ?? true; options.selectable_body = (options.selectable_body === undefined || options.selectable_body === true) ? true : false;
options.show_in_taskbar = options.show_in_taskbar ?? true; options.show_in_taskbar = options.show_in_taskbar ?? true;
options.show_maximize_button = options.show_maximize_button ?? true; options.show_maximize_button = options.show_maximize_button ?? true;
options.single_instance = options.single_instance ?? false; options.single_instance = options.single_instance ?? false;

View File

@ -2678,7 +2678,7 @@ window.get_html_element_from_options = async function(options){
options.is_shortcut = options.is_shortcut ?? 0; options.is_shortcut = options.is_shortcut ?? 0;
options.is_trash = options.is_trash ?? false; options.is_trash = options.is_trash ?? false;
options.metadata = options.metadata ?? ''; options.metadata = options.metadata ?? '';
options.multiselectable = options.multiselectable ?? true; options.multiselectable = (!options.multiselectable || options.multiselectable === true) ? true : false;
options.shortcut_to = options.shortcut_to ?? ''; options.shortcut_to = options.shortcut_to ?? '';
options.shortcut_to_path = options.shortcut_to_path ?? ''; options.shortcut_to_path = options.shortcut_to_path ?? '';
options.immutable = (options.immutable === false || options.immutable === 0 || options.immutable === undefined ? 0 : 1); options.immutable = (options.immutable === false || options.immutable === 0 || options.immutable === undefined ? 0 : 1);