mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix TS errors
This commit is contained in:
parent
603b12967c
commit
6ea64bcac5
1 changed files with 4 additions and 4 deletions
|
@ -159,7 +159,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
let fieldsCollapsed: boolean[] = [];
|
let fieldsCollapsed: boolean[] = [];
|
||||||
export function setCollapsed(defaultCollapsed: boolean[]): void {
|
export function setCollapsed(defaultCollapsed: boolean[]): void {
|
||||||
fieldsCollapsed =
|
fieldsCollapsed =
|
||||||
sessionOptions[notetypeMeta?.id?.toString()]?.fieldsCollapsed ??
|
sessionOptions[notetypeMeta!.id?.toString()]?.fieldsCollapsed ??
|
||||||
defaultCollapsed;
|
defaultCollapsed;
|
||||||
}
|
}
|
||||||
let clozeFields: boolean[] = [];
|
let clozeFields: boolean[] = [];
|
||||||
|
@ -172,7 +172,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
let plainTextDefaults: boolean[] = [];
|
let plainTextDefaults: boolean[] = [];
|
||||||
|
|
||||||
export function setPlainTexts(defaultPlainTexts: boolean[]): void {
|
export function setPlainTexts(defaultPlainTexts: boolean[]): void {
|
||||||
const states = sessionOptions[notetypeMeta?.id?.toString()]?.fieldStates;
|
const states = sessionOptions[notetypeMeta!.id?.toString()]?.fieldStates;
|
||||||
if (states) {
|
if (states) {
|
||||||
richTextsHidden = states.richTextsHidden;
|
richTextsHidden = states.richTextsHidden;
|
||||||
plainTextsHidden = states.plainTextsHidden;
|
plainTextsHidden = states.plainTextsHidden;
|
||||||
|
@ -237,7 +237,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
const values: boolean[] = [];
|
const values: boolean[] = [];
|
||||||
const notetype = await getNotetype({ ntid: notetypeMeta.id });
|
const notetype = await getNotetype({ ntid: notetypeMeta!.id });
|
||||||
const anySticky = notetype.fields.some((f) => f.config!.sticky);
|
const anySticky = notetype.fields.some((f) => f.config!.sticky);
|
||||||
for (const field of notetype.fields) {
|
for (const field of notetype.fields) {
|
||||||
const sticky = field.config!.sticky;
|
const sticky = field.config!.sticky;
|
||||||
|
@ -987,7 +987,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
}
|
}
|
||||||
|
|
||||||
const notetype = await getNotetype({
|
const notetype = await getNotetype({
|
||||||
ntid: notetypeId,
|
ntid: notetypeId!,
|
||||||
});
|
});
|
||||||
const fieldNames = (
|
const fieldNames = (
|
||||||
await getFieldNames({
|
await getFieldNames({
|
||||||
|
|
Loading…
Reference in a new issue