diff --git a/core/modules/rendertree/wikirendertree.js b/core/modules/rendertree/wikirendertree.js index 34f07a22a..a2e38071a 100644 --- a/core/modules/rendertree/wikirendertree.js +++ b/core/modules/rendertree/wikirendertree.js @@ -101,14 +101,14 @@ WikiRenderTree.prototype.refreshInDom = function(changes) { /* Find the value of a given context variable for a particular renderer node */ -WikiRenderTree.prototype.getContextVariable = function(renderer,name) { +WikiRenderTree.prototype.getContextVariable = function(renderer,name,defaultValue) { while(renderer) { if($tw.utils.hop(renderer.context,name)) { return renderer.context[name]; } renderer = renderer.parentRenderer; }; - return undefined; + return defaultValue; }; /*