Skip to content

Commit

Permalink
Merge branch 'hotfix/4.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
bjost2s committed Aug 19, 2021
2 parents 1dece03 + 76836f6 commit 20e7c47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions OpenRobertaServer/staticResources/js/helper/wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ define([ 'exports', 'comm', 'log', 'jquery' ], function(exports, COMM, LOG, $) {
var start = new Date();
try {
var that = this;
fnToBeWrapped.apply(that,arguments);
var result = fnToBeWrapped.apply(that,arguments);
if (message !== undefined) {
var elapsed = new Date() - start;
LOG.text(elapsed + ' msec: ' + message, '[[TIME]] ');
}
return result;
} catch (e) {
var err = new Error();
var elapsed = new Date() - start;
Expand Down Expand Up @@ -65,8 +66,9 @@ define([ 'exports', 'comm', 'log', 'jquery' ], function(exports, COMM, LOG, $) {
numberOfActiveActions++;
var fn = wrapTotal(fnToBeWrapped, message);
var that = this;
fn.apply(that,arguments);
var result = fn.apply(that,arguments);
numberOfActiveActions--;
return result;
} catch (e) {
numberOfActiveActions--;
var err = new Error();
Expand Down

0 comments on commit 20e7c47

Please sign in to comment.