Fix Uncaught ReferenceError: isRegistrationDone is not defined