TryGhost
OSS
Ghost
Improved getTopPostsViews to skip a wasted DB lookup with no views data no ref - postsWithViews is built by mapping over viewsData, so whenever viewsData is empty (no tinybirdClient, or Tinybird returned nothing for the range) the posts/authors/attribution/click queries feeding that lookup were run for nothing - the result was always going to be [] - skip that block entirely when viewsData is empty and go straight to the recency-based backfill query, which already covers this case - no behavior change: same tests (posts.test.js) pass unmodified
nx run ghost:test:legacy
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx run ghost:test:legacy
Click to copy
Linux
4 CPU cores
read-write
access token used
ce95f7ac
29103