Skip to content

Commit

Permalink
Merge pull request #449 from jabahere/expo-sqlite-persist-plugin-fix
Browse files Browse the repository at this point in the history
fix missing storage error
  • Loading branch information
jmeistrich authored Jan 26, 2025
2 parents 3b1c127 + 2c7a016 commit 3f7fe68
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/persist-plugins/expo-sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ export class ObservablePersistSqlite implements ObservablePersistPlugin {
private data: Record<string, any> = {};
private storage: SQLiteStorage;
constructor(storage: SQLiteStorage) {
console.error(
'[legend-state] ObservablePersistSqlite failed to initialize. You need to pass the SQLiteStorage instance.',
);
if (!storage) {
console.error(
'[legend-state] ObservablePersistSqlite failed to initialize. You need to pass the SQLiteStorage instance.',
);
}
this.storage = storage;
}
public getTable(table: string, init: any) {
Expand Down

0 comments on commit 3f7fe68

Please sign in to comment.