fix deprecation warning: use slice instead of substr

This commit is contained in:
Ulf Gebhardt 2022-03-22 13:18:10 +01:00
parent 31c6f77a78
commit 5e41b59fe7
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 2 additions and 2 deletions

View File

@ -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,
}

View File

@ -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 = {