bugfix, simplifying loop avoiding win=undefined

This commit is contained in:
sebv
2014-01-30 21:36:04 +08:00
parent 728f6c7df1
commit f4aa464cf4

View File

@@ -128,15 +128,7 @@ iOSHybrid.onPageChange = function (pageArray) {
}, this)[0];
}.bind(this);
var win = item(pageArray);
var ret = false;
_.each(item(this.windowHandleCache), function (el, idx, l) {
if (l[idx] !== win[idx]) {
ret = true;
}
});
return ret;
return !_.isEqual(item(this.windowHandleCache), item(pageArray));
}.bind(this);
// If a window gets navigated to an anchor it doesn't always fire a page callback event