Skip to content

Commit ba710b9

Browse files
committed
Fix bug for search
The new targets field was not being accessed while searching.
1 parent 5e0502e commit ba710b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/search.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,10 @@ exports.printResults = (results, config) => {
197197
results.forEach((elem) => {
198198
let cmdname = utils.parsePagename(elem.file);
199199
let output = ' $ ' + cmdname;
200-
let array = shortIndex[cmdname]['platforms'];
201-
if (array.indexOf('common') === -1 && array.indexOf(preferredPlatform) === -1) {
202-
output += ' (Available on: ' + array.join(', ') + ')';
200+
let targets = shortIndex[cmdname]['targets'];
201+
let platforms = targets.map((t) => {return t.os;});
202+
if (platforms.indexOf('common') === -1 && platforms.indexOf(preferredPlatform) === -1) {
203+
output += ' (Available on: ' + platforms.join(', ') + ')';
203204
}
204205
outputs.add(output);
205206
});

0 commit comments

Comments
 (0)