Skip to content
Snippets Groups Projects

Resolve "full reaction returned by API should have info about reactants/products/modifiers"

Merged Piotr Gawron requested to merge 111-full-reaction-with-aliases into master
3 files
+ 61
25
Compare changes
  • Side-by-side
  • Inline
Files
3
"use strict";
var Alias = require('./Alias');
/**
* Class representing reaction data.
*
@@ -129,7 +131,17 @@ Reaction.prototype.update = function(javaObject) {
};
Reaction.prototype.isComplete = function() {
return this._complete;
var self = this;
var result = self._complete;
var reactants = self.getReactants();
if (reactants.length === 0) {
result = false;
} else {
if (!(self.getReactants()[0] instanceof Alias)) {
result = false;
}
}
return result;
};
Reaction.prototype.setIsComplete = function(complete) {
@@ -290,4 +302,4 @@ Reaction.prototype.setHierarchyVisibilityLevel = function(hierarchyVisibilityLev
this._hierarchyVisibilityLevel = hierarchyVisibilityLevel;
};
module.exports = Reaction;
module.exports = Reaction;
\ No newline at end of file
Loading