From 8b30653fb03dfdf7478051ebc10229cc6a8110b3 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 27 Mar 2016 00:37:56 +0200 Subject: [PATCH] Fix caching schemas with discriminator --- lib/components/JsonSchema/json-schema-lazy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/components/JsonSchema/json-schema-lazy.js b/lib/components/JsonSchema/json-schema-lazy.js index a8c7b589..bbf20974 100644 --- a/lib/components/JsonSchema/json-schema-lazy.js +++ b/lib/components/JsonSchema/json-schema-lazy.js @@ -55,7 +55,8 @@ export default class JsonSchemaLazy { let $element = compRef.location.nativeElement; // skip caching view with tabs inside (discriminator) as it needs attached controller - if ($element.querySelector('tabs')) { + // FIXME: get rid of dependency on selector + if ($element.querySelector('.discriminator-wrap')) { this.dcl.loadNextToLocation(JsonSchema, this.elementRef).then((compRef) => { compRef.instance.pointer = this.pointer; compRef.hostView.changeDetectorRef.markForCheck();