From 10f98d8e57033fa120dff68f6afb55042df3da9b Mon Sep 17 00:00:00 2001 From: Dim Date: Sat, 27 Jan 2018 01:42:49 -0500 Subject: [PATCH] use String#padStart for Role#hexColor (#2294) --- src/structures/Role.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/structures/Role.js b/src/structures/Role.js index 5712b27ee..68a3c3f03 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -95,9 +95,7 @@ class Role extends Base { * @readonly */ get hexColor() { - let col = this.color.toString(16); - while (col.length < 6) col = `0${col}`; - return `#${col}`; + return `#${this.color.toString(16).padStart(6, '0')}`; } /**