Skip to content

Commit

Permalink
fix!: Common模板搜索脚本,需要的数值结果为0导致直接返回Cell,别字修正Sell->Cell
Browse files Browse the repository at this point in the history
  • Loading branch information
ted423 committed Jun 1, 2022
1 parent 033f62c commit 56cee38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resource/schemas/Common/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
let selector = options.resultSelector;
let dataRowSelector = options.entry.dataRowSelector || "> tbody > tr";
selector = selector.replace(dataRowSelector, "");
let sellSelector = options.entry.dataSellSelector || ">td";
let cellSelector = options.entry.dataCellSelector || ">td";
// 获取数据表格
let table = options.page.find(selector);
// 获取种子列表行
Expand Down Expand Up @@ -68,7 +68,7 @@
// 遍历数据行
for (let index = beginRowIndex; index < rows.length; index++) {
const row = rows.eq(index);
let cells = row.find(sellSelector);
let cells = row.find(cellSelector);

let title = this.getTitle(row, cells, fieldIndex);

Expand Down Expand Up @@ -145,7 +145,7 @@

let result = Searcher.getFieldValue(this.site, parent, fieldName);

if (!result && cell) {
if (!result && cell && result !== 0) {
if (returnCell) {
return cell;
}
Expand Down

0 comments on commit 56cee38

Please sign in to comment.