Skip to content

Commit

Permalink
use toJSON for schema test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevensJourney committed Aug 19, 2024
1 parent eeae6b5 commit 019ca72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/src/client/AbstractPowerSyncDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB

const { database, schema } = options;

if (false == schema instanceof Schema) {
if (typeof schema?.toJSON != 'function') {
throw new Error('The `schema` option should be provided and should be an instance of `Schema`.');
}

Expand Down

0 comments on commit 019ca72

Please sign in to comment.