refactor: move components from /drawing/inline to /drawing

- they will be used for other positioning element (floating)
This commit is contained in:
Igor Bulovski
2018-06-08 07:50:23 +02:00
parent 548fe3c864
commit ac40a40ec0
42 changed files with 7 additions and 7 deletions

View File

@ -111,10 +111,10 @@ export class ImportedXmlComponent extends XmlComponent {
static fromXmlString(importedContent: string): ImportedXmlComponent {
const imported = fastXmlParser.parse(importedContent, parseOptions);
const elementName = Object.keys(imported)[0];
const converted = convertToXmlComponent(elementName, imported[elementName]);
if (Array.isArray(converted) && converted.length > 1) {
if (Array.isArray(converted) && converted.length > 1) {
throw new Error("Invalid conversion, input must be one element.");
}
return Array.isArray(converted) ? converted[0] : converted;