about summary refs log tree commit diff
path: root/website/sandbox/contentful/src/contentful.ts
diff options
context:
space:
mode:
Diffstat (limited to 'website/sandbox/contentful/src/contentful.ts')
-rw-r--r--website/sandbox/contentful/src/contentful.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/website/sandbox/contentful/src/contentful.ts b/website/sandbox/contentful/src/contentful.ts
index e09cd8fc4a..02ebc92b68 100644
--- a/website/sandbox/contentful/src/contentful.ts
+++ b/website/sandbox/contentful/src/contentful.ts
@@ -8,10 +8,10 @@ let client: ContentfulClientApi;
 
 // Idempotent way to get a reference to the Contentful client.
 export const getClient = (): ContentfulClientApi => {
-  if (typeof client !== 'undefined') {
+  if (typeof client !== "undefined") {
     return client;
   } else {
-    if (typeof space === 'string' && typeof accessToken === 'string') {
+    if (typeof space === "string" && typeof accessToken === "string") {
       let client = createClient({
         space,
         accessToken,
@@ -19,7 +19,9 @@ export const getClient = (): ContentfulClientApi => {
 
       return client;
     } else {
-      throw new Error('Please set CONTENTFUL_SPACE_ID and CONTENTFUL_ACCESS_TOKEN');
+      throw new Error(
+        "Please set CONTENTFUL_SPACE_ID and CONTENTFUL_ACCESS_TOKEN"
+      );
     }
   }
-}
+};