diff --git a/packages/core/package.json b/packages/core/package.json index e828fbfb4..ac765b710 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@thatopen/components", "description": "Collection of core functionalities to author BIM apps.", - "version": "2.4.0-alpha.9", + "version": "2.4.0-alpha.10", "author": "That Open Company", "contributors": [ "Antonio Gonzalez Viegas (https://github.com/agviegas)", diff --git a/packages/core/src/fragments/Classifier/index.ts b/packages/core/src/fragments/Classifier/index.ts index 65f811620..16f1ca141 100644 --- a/packages/core/src/fragments/Classifier/index.ts +++ b/packages/core/src/fragments/Classifier/index.ts @@ -524,21 +524,19 @@ export class Classifier extends Component implements Disposable { } } - return JSON.stringify(exported); + return exported; } /** * Imports a classification previously exported with .export(). * @param data the serialized classification to import. */ - import(data: string) { - const imported = JSON.parse(data) as ExportedClassification; - - for (const systemName in imported) { + import(data: ExportedClassification) { + for (const systemName in data) { if (!this.list[systemName]) { this.list[systemName] = {}; } - const system = imported[systemName]; + const system = data[systemName]; for (const groupName in system) { const group = system[groupName]; this.list[systemName][groupName] = {