diff --git a/packages/mindplot/src/components/import/FreemindImporter.ts b/packages/mindplot/src/components/import/FreemindImporter.ts index d5fd6c31..6967dc45 100644 --- a/packages/mindplot/src/components/import/FreemindImporter.ts +++ b/packages/mindplot/src/components/import/FreemindImporter.ts @@ -1,5 +1,4 @@ import xmlFormatter from 'xml-formatter'; -import { off } from 'process'; import Importer from './Importer'; import Mindmap from '../model/Mindmap'; import RelationshipModel from '../model/RelationshipModel'; diff --git a/packages/web2d/src/components/Point.js b/packages/web2d/src/components/Point.js index 7fe9da23..ab445ac0 100644 --- a/packages/web2d/src/components/Point.js +++ b/packages/web2d/src/components/Point.js @@ -41,14 +41,16 @@ class Point { } Point.fromString = function pointFromString(point) { - const values = point.split(','); let result = null; - if (values.lenght > 1) { - const x = Number.parseInt(values[0], 10); - const y = Number.parseInt(values[1], 10); + if (point) { + const values = point.split(','); + if (values.lenght > 1) { + const x = Number.parseInt(values[0], 10); + const y = Number.parseInt(values[1], 10); - if (!Number.isNaN(x) && !Number.isNaN(y)) { - result = new Point(x, y); + if (!Number.isNaN(x) && !Number.isNaN(y)) { + result = new Point(x, y); + } } } return result;