From 2d65b2900e8180c67571653ec509107d2f4b957b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 9 Jan 2015 19:12:42 +0100 Subject: [PATCH] Do not clutter passed object in WCF.Template.fetch() Previously a __wcf and a __window member were added to the object. --- wcfsetup/install/files/js/WCF.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 4e2b0e4a87..2287c855d9 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -4771,7 +4771,7 @@ WCF.Template = Class.extend({ template = "$output += '" + template + "';"; try { - this.fetch = new Function("v", "if (typeof v != 'object') { v = {}; } v.__window = window; v.__wcf = window.WCF; var $output = ''; " + template + ' return $output;'); + this.fetch = new Function("v", "v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; " + template + ' return $output;'); } catch (e) { console.debug("var $output = ''; " + template + ' return $output;'); -- 2.20.1