Skip to content

Commit

Permalink
lint pass
Browse files Browse the repository at this point in the history
  • Loading branch information
mucool1205 committed Dec 20, 2024
1 parent 97bd378 commit 9a04b77
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/env/src/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,12 @@ export class PercyEnv {
// PERCY_FORCE_PKG_VALUE for forcing package.json values
// to be used as the current environment values in client
get forcedPkgValue() {
let pkg = this.vars.PERCY_FORCE_PKG_VALUE;
return JSON.parse(pkg) || null;
try {
let pkg = this.vars.PERCY_FORCE_PKG_VALUE;
return JSON.parse(pkg) || null;
} catch (e) {
return null;
}
}
}

Expand Down

0 comments on commit 9a04b77

Please sign in to comment.