Closed jonsnyder closed 2 years ago
@Adobe export issue to Jira project PDCL as Story
:x: Something went wrong. Cannot create Jira issue.
@jonsnyder I believe as a fast workaround that if you add an environment
section to your .sandbox/container.js
file then this should have the behavior you desire.
Expected Behaviour
turbine.environment
should be defined and available when running the library sandbox. Ideally, you would be able to set the stage in the library settings somewhere so you could test your code with differentenvironment.stage
s.Actual Behaviour
turbine.environment
is undefined.Reproduce Scenario (including but not limited to)
We have code in the alloy extension to use a different data-stream depending on the environment. During testing today, I noticed errors when running the library sandbox that we don't see in the production site. I realized it was because we access
turbine.environment.stage
whenturbine.environment
is undefined.Steps to Reproduce
Within library code, access
turbine.environment.stage
. Load the library sandbox, and see the null pointer error in the console.Sample Code that illustrates the problem