From 5868c91cfb54cfa9177572b201d88d1168bf5b06 Mon Sep 17 00:00:00 2001
From: Leonid Logvinov <logvinov.leon@gmail.com>
Date: Wed, 9 Jan 2019 10:54:32 +0100
Subject: Fix static tests

---
 packages/dev-tools-pages/ts/components/code.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'packages/dev-tools-pages/ts/components/code.tsx')

diff --git a/packages/dev-tools-pages/ts/components/code.tsx b/packages/dev-tools-pages/ts/components/code.tsx
index dbd1a7e3c..71d7a7752 100644
--- a/packages/dev-tools-pages/ts/components/code.tsx
+++ b/packages/dev-tools-pages/ts/components/code.tsx
@@ -164,7 +164,7 @@ class Code extends React.Component<CodeProps, CodeState> {
                     ) : null}
                 </Base>
                 {navigator.userAgent !== 'ReactSnap' && canCopy ? (
-                    <Button onClick={this._handleCopyAsync}>{this.state.didCopy ? 'Copied' : 'Copy'}</Button>
+                    <Button onClick={this._handleCopyAsync.bind(this)}>{this.state.didCopy ? 'Copied' : 'Copy'}</Button>
                 ) : null}
             </Container>
         );
@@ -182,7 +182,7 @@ class Code extends React.Component<CodeProps, CodeState> {
             });
         }
     }
-    private readonly _handleCopyAsync = async () => {
+    private async _handleCopyAsync(): Promise<void> {
         try {
             if ('clipboard' in navigator) {
                 await (navigator as any).clipboard.writeText(this.props.children);
-- 
cgit v1.2.3

