Closed hazelmeow closed 1 month ago
Thanks for the report! I'll take a look but might take up to a week before I can get to it.
In sqlite-api.js, sqlite3.set_authorizer function, adapt calls cvtArgs which returns an array of converted args. This array is passed as the first arg to the callback, when it should probably be spread instead:
Exactly right. Fix incoming.
It seems to me that set_authorizer's callback is not called correctly. I'm not using the function or familiar with it but I spotted this while reading the code.
In
sqlite-api.js
,sqlite3.set_authorizer
function,adapt
callscvtArgs
which returns an array of converted args. This array is passed as the first arg to the callback, when it should probably be spread instead: https://github.com/rhashimoto/wa-sqlite/blob/160e2fb6812604cdf4748f169c298f5c4cb11a99/src/sqlite-api.js#L633The tests don't currently check what the callback was called with, but we can make them fail if we check that
iActionCode
was a defined value: