Skip to content

Commit

Permalink
fix: fix ssr
Browse files Browse the repository at this point in the history
This fixes the broken ssr introduced by the
change in version calculation in blackout-react/analytics.
Also fixes a minor jsdoc error in GoogleConsentMode.
  • Loading branch information
Bruno Oliveira committed Mar 12, 2024
1 parent 1544c56 commit 16118ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions packages/react/src/analytics/constants.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// We use a require here to avoid typescript complaining of `package.json` is not
// under rootDir that we would get if we used an import. Typescript apparently ignores
// requires.
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { name, version } = require('../../package.json');
import { name, version } from '../../package.json';

export const PACKAGE_VERSION = version;
export const PACKAGE_NAME = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ export class GoogleConsentMode {
/**
* Handles consent by updating the data layer with consent information.
*
* @param {string} consent - The consent command "consent".
* @param consentCommand
* @param {string} consentCommand - The consent command "consent".
* @param {string} command - The command "default" or "update".
* @param {object} consentParams - The consent arguments.
*/
Expand Down

0 comments on commit 16118ca

Please sign in to comment.