From 3b5cd1068b178e4b308d4acd9f62a6209f19f8f4 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 29 Nov 2015 17:06:08 +0200 Subject: [PATCH] minor code improvement --- lib/components/JsonSchema/json-schema.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/components/JsonSchema/json-schema.js b/lib/components/JsonSchema/json-schema.js index 7924b07c..318f69e3 100644 --- a/lib/components/JsonSchema/json-schema.js +++ b/lib/components/JsonSchema/json-schema.js @@ -2,6 +2,7 @@ import {RedocComponent, BaseComponent} from '../base'; import {ElementRef} from 'angular2/angular2'; +import JsonPointer from '../../utils/JsonPointer'; @RedocComponent({ selector: 'json-schema', @@ -83,7 +84,7 @@ export default class JsonSchema extends BaseComponent { let itemFormat = propData.items.format; if (itemType === 'object') { itemType = propData.items.title || 'object'; - propData._pointer = propData.items._pointer || this.pointer + '/properties/' + prop + '/items'; + propData._pointer = propData.items._pointer || JsonPointer.join(this.pointer, ['properties', prop, 'items']); } propData._displayType = `array of ${itemType}`; propData.format = itemFormat;