Skip to content

Commit

Permalink
Merge pull request #457 from ChristianMayer/fix_350_Make_startpage_pa…
Browse files Browse the repository at this point in the history
…rameter_more_robust

Fix issue #350: Make startpage parameter more robust
  • Loading branch information
peuter committed Jan 9, 2017
2 parents 055f3bd + 992e705 commit d0b0adb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/TemplateEngine.js
Expand Up @@ -1111,6 +1111,9 @@ define([
rememberLastPage = false;
}
}
// check that startpage does exits
if( $('#'+startpage+'.page').length === 0 )
startpage = 'id_'; // default to top most page
}
thisTemplateEngine.currentPage = $('#'+startpage);

Expand Down

0 comments on commit d0b0adb

Please sign in to comment.