From: Tim Düsterhus Date: Mon, 24 Jun 2013 13:49:20 +0000 (+0300) Subject: Make window and WCF available to WCF.Template X-Git-Tag: 2.0.0_Beta_5~148 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e338ca2c0c6840e4311a804a17a3966735e27880;p=GitHub%2FWoltLab%2FWCF.git Make window and WCF available to WCF.Template --- 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;');