Skip to content

Commit eb41d07

Browse files
committed
update
1 parent a1d2657 commit eb41d07

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

components/supabase/supabase.app.mjs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,14 @@ export default {
8787
ascending = args.sortOrder === "ascending",
8888
max,
8989
} = args;
90-
const resp = await this.retryWithExponentialBackoff(
91-
() => this.baseFilter(client, table, orderBy, ascending, max)
92-
.then((q) => {
93-
if (filter) this[filter](q, column, value);
94-
return q;
95-
}),
96-
);
90+
const ctx = this;
91+
const resp = await this.retryWithExponentialBackoff(async () => {
92+
let query = ctx.baseFilter(client, table, orderBy, ascending, max);
93+
if (filter) {
94+
query = ctx[filter](query, column, value);
95+
}
96+
return await query;
97+
});
9798
return resp;
9899
},
99100
baseFilter(client, table, orderBy, ascending, max) {

0 commit comments

Comments
 (0)