Skip to content

Commit

Permalink
Merge pull request #108 from rogershi-dev/feature/registration-auth
Browse files Browse the repository at this point in the history
Fixed 'Cnnot access currentPage before initialization' error
  • Loading branch information
rogershi-dev authored Jul 14, 2024
2 parents c236746 + 1a050cd commit 6a418eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/views/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ block content
each repo in githubRepos
.col-lg-4.col-md-6.col-sm-12.mb-4.custom-col
.card.card-hover
.card-body(data-repo-name=repo.name, webhook-repo-status=repo.hasSetWebhook, onclick="showModal(event)")
.card-body(data-repo-name=repo.name, webhook-repo-status=repo.hasSetWebhook, onclick=`showModal(event, ${currentPage}, ${perPage})`)
h5.card-title
span(style="color: #207fe0; font-weight: bolder; margin-right: 5px;")= repo.name
if repo.hasSetWebhook
Expand Down Expand Up @@ -192,7 +192,7 @@ block content

//- Custom Script
script.
function showModal(event) {
function showModal(event, currentPage, perPage) {
const repoName = event.currentTarget.getAttribute('data-repo-name');
const hasSetWebhook = event.currentTarget.getAttribute('webhook-repo-status');
const currentPage = currentPage || 1;
Expand Down

0 comments on commit 6a418eb

Please sign in to comment.