File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ $(document).ready(function() {
404
404
} ) ;
405
405
}
406
406
407
- // Render training data for our training page
407
+ // Render training data for our front page
408
408
var frontPageTrainingList = $ ( '.training-items-list' ) ;
409
409
// Stop early if the front page element does not exist
410
410
if ( frontPageTrainingList . length !== 0 ) {
@@ -444,10 +444,11 @@ $(document).ready(function() {
444
444
} ) ;
445
445
}
446
446
447
- // Render training data for the front page
447
+ // Render training data for the training page
448
+ var pathname = window . location . pathname ;
448
449
var trainingPageItemList = $ ( '.training-events .wrap .inner-box' ) ;
449
- // Stop early if the training page element does not exist
450
- if ( trainingPageItemList . length !== 0 ) {
450
+ // Check if we are on the training page and the training page element exists
451
+ if ( pathname . startsWith ( "/training" ) && trainingPageItemList . length !== 0 ) {
451
452
getTrainings ( )
452
453
. then ( function ( trainings ) {
453
454
var MAX_TRAININGS = 999 ;
You can’t perform that action at this time.
0 commit comments