From 670234dc663ceee1bd8ff4701f5d85006cad4777 Mon Sep 17 00:00:00 2001 From: Chris Duarte Date: Thu, 22 Dec 2016 05:45:56 -0800 Subject: Fix `Cannot read property "window" of undefined` (#4872) I have no good way of testing this without enterprise code to build, but with SAML enabled on our build we get an error on line 1 of a js bundle. ``` Cannot read property 'window' of undefined ``` Looking through the bundles that are being loaded, I noticed that this controller looked interesting. And I noticed there was one call to window that did not reference `global` and it was only when SAML was enabled. So it seems to match like a good puzzle piece. Happy to get some help debugging this if I'm totally wrong in this. --- webapp/components/login/login_controller.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webapp/components/login') diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx index 726853cf2..005f278bd 100644 --- a/webapp/components/login/login_controller.jsx +++ b/webapp/components/login/login_controller.jsx @@ -524,7 +524,7 @@ export default class LoginController extends React.Component { > - {window.mm_config.SamlLoginButtonText} + {global.window.mm_config.SamlLoginButtonText} ); -- cgit v1.2.3-1-g7c22