mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
chore: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
parent
968ecf8794
commit
b7ff279837
1 changed files with 1 additions and 1 deletions
|
|
@ -13,5 +13,5 @@ export default (bgColor: string) => {
|
|||
|
||||
// http://stackoverflow.com/a/11019879/1202488
|
||||
const alphaHex = Math.round(color.alpha() * 255).toString(16);
|
||||
return `#${alphaHex}${color.hex().toString().substr(1)}`;
|
||||
return `#${alphaHex}${color.hex().toString().slice(1)}`;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue