mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Fix NPE.
This commit is contained in:
parent
4dc64111c0
commit
bcee2e21d4
@ -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';
|
||||
|
@ -41,8 +41,9 @@ class Point {
|
||||
}
|
||||
|
||||
Point.fromString = function pointFromString(point) {
|
||||
const values = point.split(',');
|
||||
let result = null;
|
||||
if (point) {
|
||||
const values = point.split(',');
|
||||
if (values.lenght > 1) {
|
||||
const x = Number.parseInt(values[0], 10);
|
||||
const y = Number.parseInt(values[1], 10);
|
||||
@ -51,6 +52,7 @@ Point.fromString = function pointFromString(point) {
|
||||
result = new Point(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user