Commit 938ef0c5 authored by Piotr Gawron's avatar Piotr Gawron

Merge branch '1197-race-condition' into 'devel_14.0.x'

Resolve "MINERVANET - Error Report 181"

See merge request !1098
parents cbb2af4d a32e84b5
Pipeline #23889 passed with stage
in 15 minutes and 35 seconds
......@@ -11,8 +11,10 @@ minerva (14.0.11) stable; urgency=medium
CellDesigner file minerva (#1203)
* Bug fix: author list inproperly presented author data when some fields were
missing (#1201)
* Bug fix: refreshing minerva page with more than one plugin opened might
led to an error due to race condition (#1197)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 30 Mar 2020 10:00:00 +0200
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 30 Mar 2020 23:00:00 +0200
minerva (14.0.10) stable; urgency=medium
* Bug fix: reaction without ports in SBGN crashed upload (#1065)
......
......@@ -80,7 +80,7 @@ Plugin.prototype.setLoadedPluginData = function (loadedPluginData) {
/**
*
* @returns {UserPluginObject}
* @returns {?null|UserPluginObject}
*/
Plugin.prototype.getLoadedPluginData = function () {
return this._loadedPluginData;
......@@ -189,11 +189,15 @@ Plugin.prototype.load = function () {
Plugin.prototype.getMinWidth = function () {
var value;
var data = this.getLoadedPluginData();
if (data.minWidth !== undefined) {
if (typeof data.minWidth === "function") {
value = parseInt(data.minWidth());
} else {
value = parseInt(data.minWidth);
if (data === undefined || data === null) { //this can happen when plugin is added to list of plugins but data was not loaded yet
logger.warn("[" + this.getName() + "] Plugin data not available. ");
} else {
if (data.minWidth !== undefined) {
if (typeof data.minWidth === "function") {
value = parseInt(data.minWidth());
} else {
value = parseInt(data.minWidth);
}
}
}
return value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment