From 05efcfd0aa53041ecb6285ce972f33ee9460294c Mon Sep 17 00:00:00 2001 From: Ilja Postnovs Date: Tue, 17 Oct 2023 17:31:25 +0300 Subject: [PATCH] fix metadata parser --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/classes/utils/xmlmetadata/XMLMetadataParser.ts | 5 ++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d26a71be..8817384c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.16.1 (17-10-2023) + +- Bugfix for OData parser + ## 1.16.0 (16-10-2023) - Commands which worked with V2 OData model only now works with V4 as well diff --git a/package.json b/package.json index 715345e3..6ca15e2e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ui5plugin", "displayName": "SAPUI5 Extension", "description": "Extension for working with UI5 projects", - "version": "1.16.0", + "version": "1.16.1", "publisher": "iljapostnovs", "license": "Apache-2.0", "author": "Ilja Postnovs ", diff --git a/src/classes/utils/xmlmetadata/XMLMetadataParser.ts b/src/classes/utils/xmlmetadata/XMLMetadataParser.ts index a073bccc..7072c79f 100644 --- a/src/classes/utils/xmlmetadata/XMLMetadataParser.ts +++ b/src/classes/utils/xmlmetadata/XMLMetadataParser.ts @@ -45,9 +45,8 @@ export class XMLMetadataParser extends AXMLMetadataParser { const entityTypes = this._getArray(schema.EntityType); const complexTypes = this._getArray(schema.ComplexType); const associations = this._getArray(schema.Association); - const functionImports = - schema.EntityContainer?.FunctionImport && this._getArray(schema.EntityContainer.FunctionImport); - const entitySets = schema.EntityContainer?.EntitySet && this._getArray(schema.EntityContainer.EntitySet); + const functionImports = this._getArray(schema.EntityContainer?.FunctionImport); + const entitySets = this._getArray(schema.EntityContainer?.EntitySet); parsedAssociations.push(...this._parseAssociations(associations)); parsedEntityTypes.push(...this._parseEntityTypes(entityTypes, entitySets, parsedAssociations));