Skip to content

Commit ddcdd21

Browse files
authored
Merge pull request #145 from rchl/patch-1
[npm] Fix sorting of results
2 parents 7c1198e + 1f6f8db commit ddcdd21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Npm.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ public function search($query)
2525
foreach ($this->pkgs->results as $pkg) {
2626
$p = $pkg->package;
2727
$name = $p->name;
28+
$uid = "{$this->id}-{$name}-{$p->version}";
2829

2930
$this->cache->w->result(
30-
$this->id,
31+
$uid,
3132
$this->makeArg($name, $p->links->npm, "{$p->name}: {$p->version}"),
3233
$name,
3334
$p->description,

0 commit comments

Comments
 (0)