mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 16:55:50 +01:00
chore(prettier): fix all files
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
import becca from "../becca/becca.js";
|
||||
import BOption from "../becca/entities/boption.js";
|
||||
import { OptionRow } from '../becca/entities/rows.js';
|
||||
import { OptionRow } from "../becca/entities/rows.js";
|
||||
import { FilterOptionsByType, OptionDefinitions, OptionMap, OptionNames } from "./options_interface.js";
|
||||
import sql from "./sql.js";
|
||||
|
||||
@@ -60,11 +60,11 @@ function getOptionInt(name: FilterOptionsByType<number>, defaultValue?: number):
|
||||
function getOptionBool(name: FilterOptionsByType<boolean>): boolean {
|
||||
const val = getOption(name);
|
||||
|
||||
if (typeof val !== "string" || !['true', 'false'].includes(val)) {
|
||||
if (typeof val !== "string" || !["true", "false"].includes(val)) {
|
||||
throw new Error(`Could not parse '${val}' into boolean for option '${name}'`);
|
||||
}
|
||||
|
||||
return val === 'true';
|
||||
return val === "true";
|
||||
}
|
||||
|
||||
function setOption<T extends OptionNames>(name: T, value: string | OptionDefinitions[T]) {
|
||||
@@ -74,8 +74,7 @@ function setOption<T extends OptionNames>(name: T, value: string | OptionDefinit
|
||||
option.value = value as string;
|
||||
|
||||
option.save();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
createOption(name, value, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user