northants-design-system 0.1.134 → 0.1.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6477,19 +6477,20 @@ const VideoLink = styled.a`
6477
6477
  }
6478
6478
  `;
6479
6479
 
6480
- const cookieName = "fn-cookie";
6481
-
6480
+ const cookieName = 'fn-cookie';
6482
6481
 
6483
6482
  const getCookie = (name) => {
6484
- let dc = document.cookie;
6485
- let prefix = name + "=";
6483
+ if (typeof document === 'undefined') return '';
6486
6484
 
6487
- let begin = dc.indexOf(prefix);
6488
- if (begin == -1) return null;
6489
- var end = dc.indexOf(";", begin);
6490
- if (end == -1) end = dc.length;
6491
-
6492
- return decodeURI(dc.substring(begin + prefix.length, end));
6485
+ let dc = document.cookie;
6486
+ let prefix = name + '=';
6487
+
6488
+ let begin = dc.indexOf(prefix);
6489
+ if (begin == -1) return null;
6490
+ var end = dc.indexOf(';', begin);
6491
+ if (end == -1) end = dc.length;
6492
+
6493
+ return decodeURI(dc.substring(begin + prefix.length, end));
6493
6494
  };
6494
6495
 
6495
6496
  /**