From e338ca2c0c6840e4311a804a17a3966735e27880 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 24 Jun 2013 16:49:20 +0300 Subject: [PATCH] Make window and WCF available to WCF.Template --- 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 d2100995ca..9afb7d5a99 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -3903,7 +3903,7 @@ WCF.Template = Class.extend({ template = "$output += '" + template + "';"; try { - this.fetch = new Function("v", "var $output = ''; " + template + ' return $output;'); + this.fetch = new Function("v", "if (typeof v != 'object') { v = {}; } v.__window = window; v.__wcf = window.WCF; var $output = ''; " + template + ' return $output;'); } catch (e) { console.debug("var $output = ''; " + template + ' return $output;'); -- 2.20.1