summaryrefslogtreecommitdiffstats
path: root/webapp/components/login
diff options
context:
space:
mode:
authorChris Duarte <csduarte@users.noreply.github.com>2016-12-22 05:45:56 -0800
committerJoram Wilander <jwawilander@gmail.com>2016-12-22 08:45:56 -0500
commit670234dc663ceee1bd8ff4701f5d85006cad4777 (patch)
tree1285130baa1230bf2014cf0acdc313adbcd2d3a9 /webapp/components/login
parentc434e84114ef14b7a53ad25c658aaf5156f6d949 (diff)
downloadchat-670234dc663ceee1bd8ff4701f5d85006cad4777.tar.gz
chat-670234dc663ceee1bd8ff4701f5d85006cad4777.tar.bz2
chat-670234dc663ceee1bd8ff4701f5d85006cad4777.zip
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.
Diffstat (limited to 'webapp/components/login')
-rw-r--r--webapp/components/login/login_controller.jsx2
1 files changed, 1 insertions, 1 deletions
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 {
>
<span className='icon fa fa-lock fa--margin-top'/>
<span>
- {window.mm_config.SamlLoginButtonText}
+ {global.window.mm_config.SamlLoginButtonText}
</span>
</a>
);