1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 17:07:19 +02:00

Add default parameter value

This is actually relied on already by not passing the parameter in other
methods.
This commit is contained in:
Franz Liedke
2020-07-31 16:12:17 +02:00
parent 01384139ef
commit a044c642f6

View File

@@ -81,7 +81,7 @@ class PostStreamState {
* @param {Boolean} noAnimation
* @return {Promise}
*/
goToNumber(number, noAnimation) {
goToNumber(number, noAnimation = false) {
// If we want to go to the reply preview, then we will go to the end of the
// discussion and then scroll to the very bottom of the page.
if (number === 'reply') {
@@ -111,7 +111,7 @@ class PostStreamState {
* @param {Boolean} noAnimation
* @return {Promise}
*/
goToIndex(index, noAnimation) {
goToIndex(index, noAnimation = false) {
this.paused = true;
this.loadPromise = this.loadNearIndex(index);