Skip to content

Commit 3e0a0c5

Browse files
author
Roman Kartsev
committed
fixes #652
1 parent 8a646a1 commit 3e0a0c5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/ns.view.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,15 @@
892892
* @returns {ns.View~UpdateTree}
893893
*/
894894
ns.View.prototype._getCommonTree = function() {
895+
// Fix #652
896+
// Асинхронный вид в состоянии загрузки с невалидными моделями - переводим в состояние
897+
// асинхронной загрузки.
898+
// Такое случалось, к примеру, когда для асинхронного вида вызывали view.update() - вид рендерился
899+
// в состоянии ошибки.
900+
if (this.async && this.isLoading() && !this.isModelsValid()) {
901+
this.asyncState = true;
902+
}
903+
895904
var tree = {
896905
box: this.info.isBox,
897906
collection: this.info.isCollection,
@@ -900,7 +909,7 @@
900909
models: {},
901910
params: this.params,
902911

903-
// состояние вида, по сути выбираем моду для отрисовку
912+
// состояние вида, по сути выбираем моду для отрисовки
904913
// ok - ns-view-content
905914
// loading - ns-view-async-content
906915
// error - ns-view-error-content

0 commit comments

Comments
 (0)