remove single/double quotes from DISABLED_PLATFORMS variable
This commit is contained in:
parent
654fc8cc15
commit
248d71a9dc
|
@ -2,7 +2,9 @@ import { Platforms } from "@/meta/settings";
|
|||
|
||||
export const getEnabledPlatforms = ():string[] => {
|
||||
if (process.env.DISABLED_PLATFORMS) {
|
||||
const disabledPlatforms: string[] = String(process.env.DISABLED_PLATFORMS).replace(/\s/g, "").split(',')
|
||||
const regex = /[ '\"]/g;
|
||||
|
||||
const disabledPlatforms: string[] = String(process.env.DISABLED_PLATFORMS).replace(regex, '').split(',')
|
||||
|
||||
return [...Object.values(Platforms)].filter(p => !disabledPlatforms.includes(p))
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue