Update username-step.jsx

This commit is contained in:
R4356th 2020-05-31 19:26:54 +06:00 committed by GitHub
parent 00a2dcad63
commit 5a46a90564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,7 +58,7 @@ class UsernameStep extends React.Component {
}
// simple function to memoize remote requests for usernames
validateUsernameRemotelyWithCache (username) {
if (username in this.usernameRemoteCache this.usernameRemoteCache.hasOwnProperty[username] === 'Object') {
if (typeof this.usernameRemoteCache.hasOwnProperty[username] === 'object') {
return Promise.resolve(this.usernameRemoteCache[username]);
}
// username is not in our cache