From a2ec376d03a1e4d4b6c6cc938879846f615007eb Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Wed, 22 May 2019 13:11:48 +0100 Subject: [PATCH] Make Hogan definition clearer in radioSelect JS It helps the tests to know the `Hogan` variable is actually a property of the global variable (`window` in this case) and doesn't hurt the readability of the script. --- app/assets/javascripts/radioSelect.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/radioSelect.js b/app/assets/javascripts/radioSelect.js index 802382736..02b2afc18 100644 --- a/app/assets/javascripts/radioSelect.js +++ b/app/assets/javascripts/radioSelect.js @@ -1,7 +1,10 @@ -(function(Modules) { +(function(global) { "use strict"; + var Modules = global.GOVUK.Modules; + var Hogan = global.Hogan; + let states = { 'initial': Hogan.compile(`
@@ -151,4 +154,4 @@ }; -})(window.GOVUK.Modules); +})(window);