Skip to content

Commit 075ff0c

Browse files
cleanup
1 parent 28cff04 commit 075ff0c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/PowerSync/PowerSyncDatabase.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ public let DEFAULT_DB_FILENAME = "powersync.db"
1212
public func PowerSyncDatabase(
1313
schema: Schema,
1414
dbFilename: String = DEFAULT_DB_FILENAME,
15-
logger: (any LoggerProtocol)? = nil
15+
logger: (any LoggerProtocol) = DefaultLogger()
1616
) -> PowerSyncDatabaseProtocol {
1717

1818
return KotlinPowerSyncDatabaseImpl(
1919
schema: schema,
2020
dbFilename: dbFilename,
21-
logger: logger != nil ? DatabaseLogger(logger!) : nil
21+
logger: DatabaseLogger(logger)
2222
)
2323
}

Tests/PowerSyncTests/Kotlin/KotlinPowerSyncDatabaseImplTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class KotlinPowerSyncDatabaseImplTests: XCTestCase {
2727
// Tests currently fail if this is called.
2828
// The watched query tests try and read from the DB while it's closing.
2929
// This causes a PowerSyncException to be thrown in the Kotlin flow.
30-
// Custom exceptions are not supported by SKIEE. This causes a crash.
30+
// Custom exceptions in flows are not supported by SKIEE. This causes a crash.
3131
// FIXME: Reapply once watched query errors are handled better.
3232
// try await database.close()
3333
database = nil

0 commit comments

Comments
 (0)