diff --git a/dist/fix/fix.compact.ie.js b/dist/fix/fix.compact.ie.js index 09ac4f861..e032d1a8f 100644 --- a/dist/fix/fix.compact.ie.js +++ b/dist/fix/fix.compact.ie.js @@ -33,8 +33,10 @@ } function popTarget () { - targetStack.pop(); - Fix.Model.target = target = null; + Fix.Model.target = target = targetStack.pop(); + if (targetStack.length <= 0) { + BI.Widget.target = target = null; + } } var oldWatch = Fix.watch; diff --git a/dist/fix/fix.compact.js b/dist/fix/fix.compact.js index 7e6e5f3ca..8228dfba9 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -33,8 +33,10 @@ } function popTarget () { - targetStack.pop(); - Fix.Model.target = target = null; + Fix.Model.target = target = targetStack.pop(); + if (targetStack.length <= 0) { + BI.Widget.target = target = null; + } } var oldWatch = Fix.watch; diff --git a/src/core/widget.js b/src/core/widget.js index 73657f86c..90ff22ee6 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -517,8 +517,10 @@ }; BI.Widget.popContext = function () { - contextStack.pop(); - BI.Widget.context = context = null; + BI.Widget.context = context = contextStack.pop(); + if (contextStack.length <= 0) { + BI.Widget.context = context = null; + } }; function pushTarget (_current) { @@ -527,8 +529,10 @@ } function popTarget () { - currentStack.pop(); - BI.Widget.current = current = null; + BI.Widget.current = current = currentStack.pop(); + if (currentStack.length <= 0) { + BI.Widget.current = current = null; + } } BI.onBeforeMount = function (beforeMount) {