From e99519aaa7bda2682f5697f3a78995d9c682b524 Mon Sep 17 00:00:00 2001 From: Dylan Barth Date: Wed, 20 Jan 2016 14:31:11 +0000 Subject: [PATCH] Load zxcvbn when component is mounted. Fixes #27. --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index a3d3ff0..0f5b592 100644 --- a/src/index.js +++ b/src/index.js @@ -204,8 +204,8 @@ var InputPassword = React.createClass({ zxcvbnSrc = this.props.zxcvbn !== 'debug' ? this.props.zxcvbn : config.zxcvbnSrc; - // snippet to async load zxcvbn if enabled - (function(){var a;a=function(){var a,b;b=document.createElement("script");b.src=zxcvbnSrc;b.type="text/javascript";b.async=!0;a=document.getElementsByTagName("head")[0];return a.parentNode.insertBefore(b,a)};null!=window.attachEvent?window.attachEvent("onload",a):window.addEventListener("load",a,!1)}).call(this); + // snippet to async load zxcvbn if enabled + (function(){var a,b;b=document.createElement("script");b.src=zxcvbnSrc;b.type="text/javascript";b.async=!0;a=document.getElementsByTagName("head")[0];a.parentNode.insertBefore(b,a);}).call(this); } // set debouncer for password