Skip to content

Commit 8071a79

Browse files
authored
Merge pull request #803 from nnatter/patch-1
Call correct log method in DateTime component to prevent crash on invalid input
2 parents 4e880f2 + 7b47655 commit 8071a79

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/DateTime.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,8 @@ export default class Datetime extends React.Component {
531531
* @public
532532
*/
533533
setViewDate( date ) {
534-
let me = this;
535534
let logError = function() {
536-
return me.log( 'Invalid date passed to the `setViewDate` method: ' + date );
535+
return log( 'Invalid date passed to the `setViewDate` method: ' + date );
537536
};
538537

539538
if ( !date ) return logError();

0 commit comments

Comments
 (0)