Skip to content
Snippets Groups Projects
Commit b9712bf0 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

ReferenceGenome constructor fixed to accept null arg

parent 208ab10a
No related branches found
No related tags found
1 merge request!8Resolve "missing methods for JS app API"
......@@ -3,7 +3,7 @@
var ReferenceGenomeGeneMapping = require('./ReferenceGenomeGeneMapping');
function ReferenceGenome(javaObject) {
if (javaObject !== undefined) {
if (javaObject !== undefined && javaObject !== null) {
this.setType(javaObject.type);
this.setVersion(javaObject.version);
if (javaObject.localUrl !== undefined) {
......
......@@ -32,4 +32,10 @@ describe('ReferenceGenome', function() {
var genome = new ReferenceGenome();
assert.ok(genome);
});
it("contructor with null arg", function() {
var genome = new ReferenceGenome(null);
assert.ok(genome);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment