mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix: bugs caught with tests
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user