mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 05:17:35 +00:00
fix: trim strings from comma-separated values (#472)
Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
+1
-1
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user