File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
33
44const Backspace = ( ) => < noscript /> ;
55
6+ Backspace . componentName = 'Backspace' ;
7+
68Backspace . propTypes = {
79 count : PropTypes . number ,
810 delay : PropTypes . number ,
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
33
44const Delay = ( ) => < noscript /> ;
55
6+ Delay . componentName = 'Delay' ;
7+
68Delay . propTypes = {
79 ms : PropTypes . number . isRequired ,
810} ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import Backspace from './Backspace' ;
3- import Delay from './Delay' ;
42
53export const sleep = ( val ) => new Promise ( ( resolve ) => (
64 val != null ? setTimeout ( resolve , val ) : resolve ( )
@@ -34,11 +32,11 @@ export function exclude(obj, keys) {
3432}
3533
3634export function isBackspaceElement ( element ) {
37- return element && element . type === Backspace ;
35+ return element && element . type && element . type . componentName === ' Backspace' ;
3836}
3937
4038export function isDelayElement ( element ) {
41- return element && element . type === Delay ;
39+ return element && element . type && element . type . componentName === ' Delay' ;
4240}
4341
4442export function extractTextFromElement ( element ) {
You can’t perform that action at this time.
0 commit comments