From c8baa728680021c8ce84939ccd5dfb96575a417c Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Mon, 3 Jul 2017 10:51:25 +0200 Subject: [PATCH] check for undefined udded for bioentity type --- frontend-js/src/main/js/map/data/BioEntity.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend-js/src/main/js/map/data/BioEntity.js b/frontend-js/src/main/js/map/data/BioEntity.js index 01f1c76d51..149dfd3976 100644 --- a/frontend-js/src/main/js/map/data/BioEntity.js +++ b/frontend-js/src/main/js/map/data/BioEntity.js @@ -92,6 +92,9 @@ BioEntity.prototype.getDescription = function() { }; BioEntity.prototype.setType = function(type) { + if (type === undefined) { + throw new Error("type cannot be undefined"); + } this._type = type; }; @@ -125,5 +128,4 @@ BioEntity.prototype.setReferences = function(references) { this.references = references; }; - module.exports = BioEntity; -- GitLab