Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log and key fallback added if not prod #9

Merged
merged 6 commits into from
Jun 15, 2022
Merged

log and key fallback added if not prod #9

merged 6 commits into from
Jun 15, 2022

Conversation

ali-718
Copy link
Collaborator

@ali-718 ali-718 commented Jun 13, 2022

No description provided.

@ali-718 ali-718 requested a review from assetcrush June 13, 2022 16:34
example/src/App.js Outdated Show resolved Hide resolved
Copy link

@fawaz-ahmed fawaz-ahmed left a comment

Choose a reason for hiding this comment

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

Some refactoring needed

Copy link

@fawaz-ahmed fawaz-ahmed left a comment

Choose a reason for hiding this comment

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

@ali-718 for this logic dont use acEnv, instead use process.env.NODE_ENV

let headers = {};

if (process.env.NODE_ENV === "development" && key === '') {
Copy link
Owner

@assetcrush assetcrush Jun 14, 2022

Choose a reason for hiding this comment

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

this condition will always fail since key will always have a value in development env. Use:

if (process.env.NODE_ENV === "development" && !getKey()) {

Copy link
Owner

@assetcrush assetcrush left a comment

Choose a reason for hiding this comment

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

See comments

@ali-718 ali-718 merged commit 999f3ae into master Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants