From baf255656c689da8fed970191ba64a31ffaee825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 20 Apr 2018 12:47:20 +0200 Subject: [PATCH] Recompute index after loading new list of models in ModelAccess issue7371 review45401002 --- src/common.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common.js b/src/common.js index 0210f69489..a16f84fd1b 100644 --- a/src/common.js +++ b/src/common.js @@ -450,6 +450,7 @@ var idx = this._models.indexOf(model); if (idx < 0) { this.load_models(false); + idx = this._models.indexOf(model); } var to_load = this._models.slice( Math.max(0, idx - Math.floor(this.batchnum / 2)),