You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// src/VectorStore.ts>OramaStoreasyncrestore(vectorStoreBackup: VectorStoreBackup){Log.debug('Restoring vectorstore from backup');// vectorStoreBackup is an object and not an array for some reasonconstdocs=Object.keys(vectorStoreBackup.docs).map((key)=>vectorStoreBackup.docs[key]);awaitthis.create(vectorStoreBackup.indexName,vectorStoreBackup.vectorSize);awaitinsertMultiple(this.db,docs);// plugin:smart-second-brain:30 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'length')Log.info('Restored vectorstore from backup');Log.debug(this.db.data.docs.docs);}
Can I fix the error like this?
asyncrestore(vectorStoreBackup: VectorStoreBackup){Log.debug('Restoring vectorstore from backup');constdocs=Object.keys(vectorStoreBackup.docs).map((key)=>vectorStoreBackup.docs[key]);awaitthis.create(vectorStoreBackup.indexName,vectorStoreBackup.vectorSize);if(docs.length>0){awaitinsertMultiple(this.db,docs);}else{Log.info('No documents to restore');}Log.info('Restored vectorstore from backup');Log.debug(this.db.data.docs.docs);}
The text was updated successfully, but these errors were encountered:
Can I fix the error like this?
The text was updated successfully, but these errors were encountered: