Skip to content

Commit

Permalink
fix: trim strings from comma-separated values (#472)
Browse files Browse the repository at this point in the history
Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
  • Loading branch information
er1992 and jef committed Oct 10, 2020
1 parent 0cdf665 commit f7ed865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.ts
Expand Up @@ -14,7 +14,7 @@ config_({path: path.resolve(__dirname, '../.env')});
* @param array Default array. If not set, is `[]`.
*/
function envOrArray(environment: string | undefined, array?: string[]): string[] {
return environment ? environment.split(',') : (array ?? []);
return (environment ? environment.split(',') : (array ?? [])).map(s => s.trim());
}

/**
Expand Down

0 comments on commit f7ed865

Please sign in to comment.