From f1b4b62920c457ddcaaff2b9e0e89d4dca7c7022 Mon Sep 17 00:00:00 2001 From: Geoff Date: Wed, 17 Jun 2015 17:01:46 -0700 Subject: [PATCH 1/2] Fix undefined index error --- autoPlay.user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoPlay.user.js b/autoPlay.user.js index 914e28d..8e022d5 100644 --- a/autoPlay.user.js +++ b/autoPlay.user.js @@ -567,7 +567,9 @@ e.children[e.children.length-1].remove(); } }; - this.m_eleUpdateLogContainer[0].innerHTML = ""; + if (this.m_eleUpdateLogContainer.length) { + this.m_eleUpdateLogContainer[0].innerHTML = ""; + } } } From 83d692f2c3c1c0e3d2b2cdbead59b04e2e1f09c4 Mon Sep 17 00:00:00 2001 From: Geoff Date: Wed, 17 Jun 2015 17:55:13 -0700 Subject: [PATCH 2/2] Actually fix undefined element error --- autoPlay.user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoPlay.user.js b/autoPlay.user.js index 8e022d5..f9665f3 100644 --- a/autoPlay.user.js +++ b/autoPlay.user.js @@ -2,7 +2,7 @@ // @name /u/wchill Monster Minigame Auto-script w/ auto-click // @namespace https://github.com/wchill/steamSummerMinigame // @description A script that runs the Steam Monster Minigame for you. -// @version 4.7.1 +// @version 4.7.2 // @match *://steamcommunity.com/minigame/towerattack* // @match *://steamcommunity.com//minigame/towerattack* // @grant none @@ -16,7 +16,7 @@ "use strict"; //Version displayed to client, update along with the @version above - var SCRIPT_VERSION = '4.7.1'; + var SCRIPT_VERSION = '4.7.2'; // OPTIONS var clickRate = 20; @@ -567,7 +567,7 @@ e.children[e.children.length-1].remove(); } }; - if (this.m_eleUpdateLogContainer.length) { + if (this.m_eleUpdateLogContainer && this.m_eleUpdateLogContainer[0]) { this.m_eleUpdateLogContainer[0].innerHTML = ""; } }