diff --git a/package.json b/package.json index cf1b797..ddfb9eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "paravel", - "version": "0.5.6", + "version": "0.5.7", "description": "Yet another toolkit for nostr", "author": "hodlbod", "license": "MIT", diff --git a/src/util/Router.ts b/src/util/Router.ts index d76699a..297f652 100644 --- a/src/util/Router.ts +++ b/src/util/Router.ts @@ -72,7 +72,8 @@ export class Router { } const items = Object.entries(scores) - .sort((a, b) => a[1].score > b[1].score ? -1 : 1) + .filter(([url, {score}]) => score > 0) + .sort((a, b) => b[1].score - a[1].score) .map(([url, {score, count}]) => ({url, score, count})) return items