From d976c6fa82704f102e86cf8218b9ee81336f0d25 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Thu, 18 Aug 2022 16:54:34 -0500 Subject: [PATCH] fix: array.at is not allowed while have node14 --- src/shared/flags.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/flags.ts b/src/shared/flags.ts index ba0275f2..fe902f18 100644 --- a/src/shared/flags.ts +++ b/src/shared/flags.ts @@ -33,7 +33,7 @@ export const labelValidation = async (label: string): Promise => { export const isObjectsFolder = async (path: string): Promise => { const pathParts = resolve(path.trim()).split(sep); // has /objects/ AND objects is not the last item (there must be some child) - if (pathParts.includes('objects') && pathParts.at(-1) !== 'objects') { + if (pathParts.includes('objects') && pathParts[pathParts.length - 1] !== 'objects') { return path; } throw new SfError(messages.getMessage('error.objectDirectory', [path]));