govuk_publishing_components 36.0.1 → 36.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d41ddf9d28242ee496fbf50b88e10bbf1785c27ed809bb8ee40a9cb099092068
4
- data.tar.gz: 72d8c532895124b04ffedc228c0baffaa180828f1765d75a7cc792b4969f6ceb
3
+ metadata.gz: 9964e934f4ce2788b32ae7209b5838a04a44cadbb302c4cf45bd723fd6e9cf38
4
+ data.tar.gz: 9aa95ca3c117ebef6c201f29990e1b12961b53c435c7904936c44e7b22b53cd7
5
5
  SHA512:
6
- metadata.gz: ddd6e3b7b2dcb71844e37cb5065aea4c331c0a4e0bbf7daa38e52a9b4161bde2edea212ac24553e74df5d5b599346a8f4e72b853a1a3eb99413fec316519497b
7
- data.tar.gz: bd76e4fbb84e10bd6d20b55bd46e499431d52b9dd794b1b152065f63798d922587b9ef22d8fca9a9b3fe6d5e77d5387ddfbd52e0dcde86b7a1bfe5948ecfcd84
6
+ metadata.gz: 1094205965013e02ab4655bd58fa2e6ac6cfad898ba94275ab93fc3bec5c738fff2fe575e34ac2429e66c912fc54c25afdcf3f878d6090e20ce180bc805e4aa5
7
+ data.tar.gz: 52f249d3d4edbf8f16d696154c5faf1e751ea386eae9ede15bde6ad248bd705eda6c91b98dfaf4f221c03908b5dd57e9b8ce84eba0c9e85d2078aee907dfe9a8
@@ -92,13 +92,12 @@ module GovukPublishingComponents
92
92
  def add_ga4_political_tags(meta_tags)
93
93
  government = content_item.dig(:links, :government, 0)
94
94
 
95
- # political: true/false is in a different place to current: true/false, which is why we have 'details' and 'government[:details]'
95
+ # political: true/false is in a different place to current: true/false, which is why we have 'details' and 'government.dig(:details)'
96
96
  if government && details[:political]
97
- meta_tags["govuk:ga4-political-status"] = government[:details][:current] ? "political" : "historic"
98
-
99
- government_title = government[:title]
100
- if government_title && !government[:details][:current]
101
- meta_tags["govuk:ga4-publishing-government"] = government_title
97
+ current_government = government.dig(:details, :current)
98
+ unless current_government
99
+ meta_tags["govuk:ga4-political-status"] = "historic"
100
+ meta_tags["govuk:ga4-publishing-government"] = government[:title] if government[:title]
102
101
  end
103
102
  end
104
103
 
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "36.0.1".freeze
2
+ VERSION = "36.0.2".freeze
3
3
  end
@@ -54,12 +54,12 @@ Demo: http://sortablejs.github.io/Sortable/
54
54
 
55
55
  Install with NPM:
56
56
  ```bash
57
- $ npm install sortablejs --save
57
+ npm install sortablejs --save
58
58
  ```
59
59
 
60
60
  Install with Bower:
61
61
  ```bash
62
- $ bower install --save sortablejs
62
+ bower install --save sortablejs
63
63
  ```
64
64
 
65
65
  Import into your project: