Skip to content

Commit

Permalink
fix(pager): bind linkClass to an object (gridsome#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjvedvik committed Mar 8, 2019
1 parent 640f72d commit 6765a3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gridsome/app/components/Pager.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default {
}

return h(Link, {
staticClass: props.linkClass,
class: props.linkClass,
props: linkProps,
attrs: {
'aria-label': ariaLabel.replace('%n', page),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<g-link :class="`post-link-${node.id}`" :to="node.path">Read more</g-link>
</li>
</ul>
<Pager :info="$page.posts.pageInfo"/>
<Pager :linkClass="{ 'pager-link': true }" :info="$page.posts.pageInfo"/>
</Layout>
</template>

Expand Down
2 changes: 1 addition & 1 deletion gridsome/lib/__tests__/project-blog.build.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ test('open blog in browser', async () => {
})

test('navigate to /2', async () => {
await page.click('nav[role="navigation"] a.active + a')
await page.click('nav[role="navigation"] .pager-link.active + .pager-link')
await page.waitForSelector('#app.home-2')
})

Expand Down

0 comments on commit 6765a3d

Please sign in to comment.