diff --git a/tns-core-modules/ui/core/view-common.ts b/tns-core-modules/ui/core/view-common.ts index 7f3063a67..ec99314d9 100644 --- a/tns-core-modules/ui/core/view-common.ts +++ b/tns-core-modules/ui/core/view-common.ts @@ -988,7 +988,10 @@ export class View extends ProxyObject implements definition.View { if (!view) { throw new Error("Expecting a valid View instance."); } - + if(!(view instanceof View)) + { + throw new Error(view + " is not a valid View instance."); + } if (view._parent) { throw new Error("View already has a parent. View: " + view + " Parent: " + view._parent); }