Realtime client throw on text[] columns
See original GitHub issueRealtime client throw on text[] columns
Describe the bug
I have a table called “projects” that has has a column called “admin” which is a text[] column. I can successfully insert and update rows in the table, but the realtime client throws the following error when doing either:
If I console.log(value) here: https://github.com/supabase/realtime-js/blob/a956084d62e4b78adee5ad9864b1489ece86382c/src/lib/transformers.ts#L208
I get {example2@email.com,example2@email.com}
If I console.log(‘[’ + value + ‘]’) here: https://github.com/supabase/realtime-js/blob/a956084d62e4b78adee5ad9864b1489ece86382c/src/lib/transformers.ts#L216
I get [example2@email.com,example2@email.com]
which doesn’t parse because there are no quotes around the email strings.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Create a table with a text[] column
- Subscribe to changes on that table
- Insert into or update a record in the table
System information
- OS: ChromeOS
- Browser: Chrome
- Version of supabase-js: 1.25.0
- Version of Node.js: 14.16.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Fix confirmed. Thank you!!
@dbradleyfl just wanted to let you know there’s a new
supabase-js
release (v.1.25.1) with the fix if you want to give it a try. Sorry for the breaking change and thanks for working it out with me!I’m going to close this issue but feel free to reopen if there are still problems with your transformations.