mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Add polyfill for padStart function
This commit is contained in:
@@ -2,6 +2,8 @@ import * as React from 'react';
|
||||
|
||||
import Button from '../../shared/Button';
|
||||
|
||||
import padStart from '../../../helpers/padStart';
|
||||
|
||||
interface Props {
|
||||
mode: 'create' | 'update';
|
||||
|
||||
@@ -47,7 +49,7 @@ class PostStatusForm extends React.Component<Props, State> {
|
||||
}
|
||||
|
||||
getRandomColor() {
|
||||
return '#' + (Math.random() * 0xFFFFFF << 0).toString(16).padStart(6, '0');
|
||||
return '#' + padStart((Math.random() * 0xFFFFFF << 0).toString(16), 6, '0');
|
||||
}
|
||||
|
||||
isFormValid() {
|
||||
|
||||
Reference in New Issue
Block a user