Skip to content

Commit f55b84f

Browse files
committed
-SQL Delight Error Resolved for Web Drivers (#163)
1 parent 469290e commit f55b84f

File tree

1 file changed

+1
-1
lines changed
  • composeApp/src/jsMain/kotlin/org/company/app

1 file changed

+1
-1
lines changed

composeApp/src/jsMain/kotlin/org/company/app/App.js.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ internal actual fun isConnected(retry : () -> Unit): Boolean {
123123

124124
actual class DriverFactory actual constructor() {
125125
actual fun createDriver(): SqlDriver {
126-
val workerScriptUrl = js("""new URL("@cashapp/sqldelight-sqljs-worker/sqljs.worker.js", import.meta.url)""")
126+
val workerScriptUrl = js("import.meta.url.replace('kotlin', 'node_modules/@cashapp/sqldelight-sqljs-worker/sqljs.worker.js')")
127127
val driver = WebWorkerDriver(workerScriptUrl).also { YoutubeDatabase.Schema.create(it) }
128128
return driver
129129
}

0 commit comments

Comments
 (0)