Partially fix slow editor startup (#2382)

The variable 'collapsed' was initialized with the value 'false' because
the initial value of the store 'size' was 'undefined'. This caused an
instance of CodeMirror to be created at editor startup, regardless of
whether the option 'Use HTML editor by default' was enabled, which
significantly slowed down the startup of the editor, especially when
there were many fields in the notetype.
This commit is contained in:
Hikaru Y 2023-02-20 17:23:42 +09:00 committed by GitHub
parent 4dd151eb11
commit 3f7ba84888

View file

@ -18,7 +18,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
}
$: duration = dynamicDuration(contentHeight);
const size = tweened<number>(undefined);
const size = tweened<number>(0);
async function transition(collapse: boolean): Promise<void> {
if (collapse) {