diff options
author | Dessalines <tyhou13@gmx.com> | 2019-08-29 21:38:06 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-08-29 21:38:06 -0700 |
commit | a47af02e1b3a5d31ed2e286f508d814334dbfab1 (patch) | |
tree | 00f9a91bf058eb2c72e98d4bfd65a461b20c7837 /ui/src/components/comment-form.tsx | |
parent | 4e982ccf518bb37cee2e3dba53d3b21c20766c65 (diff) |
Fixing tribute.
Diffstat (limited to 'ui/src/components/comment-form.tsx')
-rw-r--r-- | ui/src/components/comment-form.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx index b26fe0c9..57518a13 100644 --- a/ui/src/components/comment-form.tsx +++ b/ui/src/components/comment-form.tsx @@ -6,7 +6,7 @@ import { WebSocketService, UserService } from '../services'; import * as autosize from 'autosize'; import { i18n } from '../i18next'; import { T } from 'inferno-i18next'; -import * as tributejs from 'tributejs'; +declare var Tribute: any; interface CommentFormProps { postId?: number; @@ -23,7 +23,7 @@ interface CommentFormState { export class CommentForm extends Component<CommentFormProps, CommentFormState> { - private id = `comment-form-${btoa(Math.random()).substring(0,12)}`; + private id = `comment-form-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10)}`; private userSub: Subscription; private communitySub: Subscription; private tribute: any; @@ -40,7 +40,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> { constructor(props: any, context: any) { super(props, context); - this.tribute = new tributejs({ + this.tribute = new Tribute({ collection: [ // Users |