From 6a273ee3da0480ad11326c51f666cccd37da2893 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 2 Apr 2020 09:20:55 -0700 Subject: [PATCH] Fix react-rte tests (#43588) They check whether a method is defined on props, but the props type doesn't make the method optional. Typescript now catches this error, so I made the method optional. --- types/react-rte/react-rte-tests.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-rte/react-rte-tests.tsx b/types/react-rte/react-rte-tests.tsx index 93e7ffa8f9..df365aeaac 100644 --- a/types/react-rte/react-rte-tests.tsx +++ b/types/react-rte/react-rte-tests.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import RichTextEditor, { EditorValue } from "react-rte"; interface Props { - onChange: (val: string) => void; + onChange?: (val: string) => void; } class MyStatefulEditor extends React.Component {