Skip to content

Commit a443e91

Browse files
committed
ignore search, skip and limit when using surround
1 parent 82cdefc commit a443e91

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/runtime/composables/useDB.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class Query {
121121

122122
let records = data.filter(compile(where))
123123

124-
if (search && records.length) {
124+
if (!surround && search && records.length) {
125125
records = fuzzysort.go(search, records, config).map(res => res.obj)
126126
}
127127

@@ -147,11 +147,11 @@ class Query {
147147
records = items
148148
}
149149

150-
if (skip) {
150+
if (!surround && skip) {
151151
records = records.slice(skip)
152152
}
153153

154-
if (limit) {
154+
if (!surround && limit) {
155155
records = records.slice(0, limit)
156156
}
157157

0 commit comments

Comments
 (0)