From de7c6e913b01a538e0d346994b0c4ae3e05411d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Tisza?= Date: Wed, 14 Oct 2020 23:49:29 -0700 Subject: [PATCH] Avoid undefined in Math.max Math.max( undefined, x ) is NaN. Change-Id: I60bde01d4fc6e9a52182753f79232045f48d1f8b --- modules/ve-mw/init/targets/ve.init.mw.ArticleTarget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ArticleTarget.js index 4f8c0af72f..2a8d4a7b40 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ArticleTarget.js @@ -460,7 +460,7 @@ ve.init.mw.ArticleTarget.prototype.parseMetadata = function ( response ) { // the request that gave us the lower revid this.loading = null; // HACK: Load with explicit revid to hopefully prevent this from happening again - this.requestedRevId = Math.max( docRevId, this.revid ); + this.requestedRevId = Math.max( docRevId || 0, this.revid ); this.load(); } return false;