Hotfixes
Unifi can be patched between releases by using a special Script Include called hotfix. This page contains any hotfixes that have been made for this version. Follow the instructions to apply them.
/**
* Executes a child function corresponding to the object's type property.
* The object is passed to the child function so methods and properties can be overridden.
*
* @param {Object} obj The full class object to be patched.
*/
function hotfix(obj) {
var type = typeof obj === 'function' ? obj.prototype.type : obj.type;
if (type && typeof hotfix[type] === 'function') {
hotfix[type](obj);
}
}
hotfix.version = '3.0.3.2';
hotfix.Message = function (Message) {
Message.prototype.evaluateScript = function evaluateScript(record, element, vars) {
var source = vars.source;
var result;
vars.message = this.getRecord();
vars.variables = this.getIntegration().getActiveConnection().getVariables();
if (vars.stage) {
vars.$stage = vars.stage.$stage;
}
result = utils.evaluateScript(record, element, vars);
// UN-1003: reset source - GlideScopedEvaluator changes the GlideRecord object
// to ScopedGlideRecord which breaks object equality.
if (source && source.$model) {
source.$model.setRecord(source);
}
return result;
};
}Last updated
Was this helpful?
