Fix: bugs caught with tests

This commit is contained in:
vakrilov
2016-01-21 17:13:58 +02:00
committed by vakrilov
parent 96c638e1cc
commit 216cfb11de
2 changed files with 9 additions and 7 deletions

View File

@@ -271,7 +271,7 @@ export class View extends viewCommon.View {
if (superview && this._nativeView) {
var types = require("utils/types");
if (types.isNullOrUndefined(atIndex) || atIndex >= this._nativeView.subviews.count) {
if (types.isNullOrUndefined(atIndex) || atIndex >= superview.subviews.count) {
superview.addSubview(this._nativeView);
} else {
superview.insertSubviewAtIndex(this._nativeView, atIndex);