Skip to content

Commit

Permalink
[core] fix(classes.ts): compatibility with non-Node environments (#4934)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Sep 27, 2021
1 parent e148da2 commit 37140f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/common/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import { Elevation } from "./elevation";
import { Intent } from "./intent";
import { Position } from "./position";

const NS = process.env.BLUEPRINT_NAMESPACE || process.env.REACT_APP_BLUEPRINT_NAMESPACE || "bp3";
let NS = "bp3";
if (typeof process !== "undefined") {
NS = process.env?.BLUEPRINT_NAMESPACE ?? process.env?.REACT_APP_BLUEPRINT_NAMESPACE ?? NS;
}

// modifiers
export const ACTIVE = `${NS}-active`;
Expand Down

1 comment on commit 37140f7

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[core] fix(classes.ts): compatibility with non-Node environments (#4934)

Previews: documentation | landing | table | modern colors demo

Please sign in to comment.