fix new window loading bug
This commit is contained in:
@@ -438,6 +438,7 @@ const initializeCore = async (runtime, { plugins }) => {
|
||||
let notesAPI = null;
|
||||
let initPromise = null;
|
||||
const getNotesAPI = async () => {
|
||||
console.log("getNotesAPI before: ", notesAPI);
|
||||
if (notesAPI) return notesAPI;
|
||||
if (!initPromise) {
|
||||
initPromise = (async () => {
|
||||
@@ -458,6 +459,7 @@ const initializeCore = async (runtime, { plugins }) => {
|
||||
);
|
||||
notesAPI = new NotesAPI(adapter, encryptionKey);
|
||||
await notesAPI.init();
|
||||
console.log("getNotesAPI after: ", notesAPI);
|
||||
return notesAPI;
|
||||
})();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user