Skip to content

Commit

Permalink
fix missing storage error
Browse files Browse the repository at this point in the history
  • Loading branch information
jabahere committed Jan 25, 2025
1 parent 3b1c127 commit 2c7a016
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 2c7a016

Please sign in to comment.