@@ -92,7 +92,7 @@ export function websiteAnalyticsScriptFile(
9292 // Google Analytics
9393 let gaConfig : GaConfiguration | undefined = undefined ;
9494 const siteGa = siteMeta [ kGoogleAnalytics ] ;
95- if ( typeof ( siteGa ) === "object" ) {
95+ if ( typeof siteGa === "object" ) {
9696 const siteGaMeta = siteGa as Metadata ;
9797 // Merge the site and page options and then layer over defaults
9898 const trackingId = siteGaMeta [ kTrackingId ] as string ;
@@ -106,7 +106,7 @@ export function websiteAnalyticsScriptFile(
106106 anonymizedIp ,
107107 version ,
108108 ) ;
109- } else if ( siteGa && typeof ( siteGa ) === "string" ) {
109+ } else if ( siteGa && typeof siteGa === "string" ) {
110110 gaConfig = googleAnalyticsConfig ( project , siteGa as string ) ;
111111 }
112112
@@ -119,7 +119,7 @@ export function websiteAnalyticsScriptFile(
119119
120120 // Plausible Analytics
121121 const plausibleSnippet = siteMeta [ kPlausibleAnalytics ] ;
122- if ( plausibleSnippet && typeof ( plausibleSnippet ) === "string" ) {
122+ if ( plausibleSnippet && typeof plausibleSnippet === "string" ) {
123123 scripts . push ( plausibleSnippet ) ;
124124 }
125125 }
@@ -147,7 +147,7 @@ export function cookieConsentDependencies(
147147 let configuration : CookieConsentConfiguration | undefined = undefined ;
148148 let changePrefsText : string | undefined = undefined ;
149149 const consent = siteMeta [ kCookieConsent ] ;
150- if ( typeof ( consent ) === "object" ) {
150+ if ( typeof consent === "object" ) {
151151 const cookieMeta = consent as Metadata ;
152152 configuration = cookieConsentConfiguration (
153153 title ,
@@ -393,7 +393,7 @@ cookieconsent.run({
393393}
394394
395395function scriptFile ( script : string , temp : TempContext ) {
396- const gaScriptFile = temp . createFile ( { suffix : "-lytics.js" } ) ;
397- Deno . writeTextFileSync ( gaScriptFile , script ) ;
398- return gaScriptFile ;
396+ const analyticsScriptFile = temp . createFile ( { suffix : "-lytics.js" } ) ;
397+ Deno . writeTextFileSync ( analyticsScriptFile , script ) ;
398+ return analyticsScriptFile ;
399399}
0 commit comments