diff --git a/4chan_x.user.js b/4chan_x.user.js index 198735e08..559bc8bc2 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3064,7 +3064,7 @@ origin = e.origin, data = e.data; if (origin === 'http://sys.4chan.org') { return qr.message(data); - } else if (data.version !== VERSION && confirm('An updated version of 4chan X is available, would you like to install it now?')) { + } else if (data.version && data.version !== VERSION && confirm('An updated version of 4chan X is available, would you like to install it now?')) { return window.location = "https://raw.github.com/mayhemydg/4chan-x/" + data.version + "/4chan_x.user.js"; } }, diff --git a/changelog b/changelog index e8c3ed852..41da7637e 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- mayhem + fix obscure and continuous prompts to auto update 2.22.1 - mayhem diff --git a/script.coffee b/script.coffee index ee553972f..ab0e97dd4 100644 --- a/script.coffee +++ b/script.coffee @@ -2437,7 +2437,7 @@ Main = {origin, data} = e if origin is 'http://sys.4chan.org' qr.message data - else if data.version isnt VERSION and confirm 'An updated version of 4chan X is available, would you like to install it now?' + else if data.version and data.version isnt VERSION and confirm 'An updated version of 4chan X is available, would you like to install it now?' window.location = "https://raw.github.com/mayhemydg/4chan-x/#{data.version}/4chan_x.user.js" node: (e) ->