Skip to content

Commit fa870d4

Browse files
committed
Scope.getFunction applies funcSynonyms
Function name synonyms are applied at compilation, but it's possible to compile an expression, add a function synonym, and then try to evaluate it, so getFunction should also apply synonyms.
1 parent edeb158 commit fa870d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runtime/scripts/jme.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,6 +2366,9 @@ Scope.prototype = /** @lends Numbas.jme.Scope.prototype */ {
23662366
*/
23672367
getFunction: function(name) {
23682368
name = jme.normaliseName(name, this);
2369+
if(jme.funcSynonyms[name]) {
2370+
name = jme.funcSynonyms[name];
2371+
}
23692372
if(!this._resolved_functions[name]) {
23702373
var scope = this;
23712374
var o = [];

0 commit comments

Comments
 (0)