From 5e41b59fe758f0e89f0a983d716ed7d944d2a179 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 22 Mar 2022 13:18:10 +0100 Subject: [PATCH] fix deprecation warning: use `slice` instead of `substr` --- admin/src/config/index.js | 2 +- frontend/src/config/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/src/config/index.js b/admin/src/config/index.js index 03700b4fa..fe373386d 100644 --- a/admin/src/config/index.js +++ b/admin/src/config/index.js @@ -16,7 +16,7 @@ const version = { APP_VERSION: pkg.version, BUILD_COMMIT: process.env.BUILD_COMMIT || null, // self reference of `version.BUILD_COMMIT` is not possible at this point, hence the duplicate code - BUILD_COMMIT_SHORT: (process.env.BUILD_COMMIT || '0000000').substr(0, 7), + BUILD_COMMIT_SHORT: (process.env.BUILD_COMMIT || '0000000').slice(0, 7), PORT: process.env.PORT || 8080, } diff --git a/frontend/src/config/index.js b/frontend/src/config/index.js index a542a11f1..3f62012ad 100644 --- a/frontend/src/config/index.js +++ b/frontend/src/config/index.js @@ -16,7 +16,7 @@ const version = { APP_VERSION: pkg.version, BUILD_COMMIT: process.env.BUILD_COMMIT || null, // self reference of `version.BUILD_COMMIT` is not possible at this point, hence the duplicate code - BUILD_COMMIT_SHORT: (process.env.BUILD_COMMIT || '0000000').substr(0, 7), + BUILD_COMMIT_SHORT: (process.env.BUILD_COMMIT || '0000000').slice(0, 7), } const environment = {