Commit ed00cd2e authored by Phil Hughes's avatar Phil Hughes

Merge branch 'text-utils-replace-legacy' into 'master'

Update substr method in text utilities

See merge request gitlab-org/gitlab!20568
parents 2f56cedf 49a927a3
...@@ -72,7 +72,7 @@ export const truncate = (string, maxLength) => `${string.substr(0, maxLength - 3 ...@@ -72,7 +72,7 @@ export const truncate = (string, maxLength) => `${string.substr(0, maxLength - 3
* @param {String} sha * @param {String} sha
* @returns {String} * @returns {String}
*/ */
export const truncateSha = sha => sha.substr(0, 8); export const truncateSha = sha => sha.substring(0, 8);
const ELLIPSIS_CHAR = ''; const ELLIPSIS_CHAR = '';
export const truncatePathMiddleToLength = (text, maxWidth) => { export const truncatePathMiddleToLength = (text, maxWidth) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment