Commit 49a927a3 authored by Sarah GP's avatar Sarah GP

Update substr method

parent 641f3e14
...@@ -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