File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @agility/content-fetch" ,
3- "version" : " 0.8.0 " ,
3+ "version" : " 0.8.1 " ,
44 "description" : " JavaScript library for the Agility Fetch API (node and browser)" ,
55 "main" : " dist/agility-content-fetch.node.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -28,19 +28,22 @@ const defaultConfig = {
2828} ;
2929
3030function buildEnvConfig ( ) {
31- let env = process . env ;
3231 let envConfig = { } ;
33- if ( env . hasOwnProperty ( 'AGILITY_BASEURL' ) ) {
34- envConfig . baseUrl = env . AGILITY_BASEURL ;
35- }
36- if ( env . hasOwnProperty ( 'AGILITY_GUID' ) ) {
37- envConfig . guid = env . AGILITY_GUID ;
38- }
39- if ( env . hasOwnProperty ( 'AGILITY_APIKEY' ) ) {
40- envConfig . apiKey = env . AGILITY_APIKEY ;
41- }
42- if ( env . hasOwnProperty ( 'AGILITY_ISPREVIEW' ) ) {
43- envConfig . isPreview = env . AGILITY_ISPREVIEW ;
32+
33+ if ( process && process . env ) {
34+ let env = process . env ;
35+ if ( env . hasOwnProperty ( 'AGILITY_BASEURL' ) ) {
36+ envConfig . baseUrl = env . AGILITY_BASEURL ;
37+ }
38+ if ( env . hasOwnProperty ( 'AGILITY_GUID' ) ) {
39+ envConfig . guid = env . AGILITY_GUID ;
40+ }
41+ if ( env . hasOwnProperty ( 'AGILITY_APIKEY' ) ) {
42+ envConfig . apiKey = env . AGILITY_APIKEY ;
43+ }
44+ if ( env . hasOwnProperty ( 'AGILITY_ISPREVIEW' ) ) {
45+ envConfig . isPreview = env . AGILITY_ISPREVIEW ;
46+ }
4447 }
4548
4649 return envConfig ;
You can’t perform that action at this time.
0 commit comments