Skip to content

Commit 487bda6

Browse files
committed
refactor: 💡 Reuse variable
1 parent 0e7d487 commit 487bda6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎addons/api/addon/utils/sqlite-query.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,7 @@ function addSearchConditions({
272272
// Use a subquery to match against the FTS table with rowids as SQLite is
273273
// much more efficient with FTS queries when using rowids or MATCH (or both).
274274
// We could have also used a join here but a subquery is simpler.
275-
conditions.push(
276-
`"${tableName}".${search?.select ?? 'rowid'} IN (${searchSql})`,
277-
);
275+
conditions.push(`"${tableName}".${searchSelect} IN (${searchSql})`);
278276
}
279277

280278
function constructSelectClause(select = [{ field: '*' }], tableName) {

0 commit comments

Comments
 (0)