Bug when using subscribtions on tables with arrays of jsons
ferdibaum opened this issue · 2 comments
I think this is because the toArray function in transformers.ts dosn't work properly for arrays of JSONs
export const toArray = (stringValue, type) => { // this takes off the '{' & '}' let stringEnriched = stringValue.slice(1, stringValue.length - 1); // converts the string into an array // if string is empty (meaning the array was empty), an empty array will be immediately returned let stringArray = stringEnriched.length > 0 ? stringEnriched.split(',') : []; let array = stringArray.map((string) => { return convertCell(type, string); }); return array; };
This looks like an older version of the toArray
function as the newest version was updated and released yesterday. Can you try version bumping your realtime-js
to v1.2.0 or supabase-js
to v1.25.0 depending on what you're using?
Yes, that was it. My bad and thanks for the quick answer.