mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Refactor: add missing await expression (#1059)
This commit is contained in:
parent
6c137306d8
commit
af5804776e
2 changed files with 5 additions and 5 deletions
|
|
@ -6,13 +6,13 @@ import { resolveReferences, resolveWidgetFieldValue } from '@/_helpers/utils';
|
|||
export const QrScanner = function QrScanner({ component, onEvent, onComponentOptionChanged, currentState }) {
|
||||
const handleError = async (errorMessage) => {
|
||||
console.log(errorMessage);
|
||||
setErrorOccured(true);
|
||||
await setErrorOccured(true);
|
||||
};
|
||||
|
||||
const handleScan = async (data) => {
|
||||
if (data !== null) {
|
||||
onEvent('onDetect', { component, data: data });
|
||||
onComponentOptionChanged(component, 'lastDetectedValue', data);
|
||||
await onEvent('onDetect', { component, data: data });
|
||||
await onComponentOptionChanged(component, 'lastDetectedValue', data);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ function SettingsPage(props) {
|
|||
|
||||
const changePassword = async () => {
|
||||
setPasswordChangeInProgress(true);
|
||||
const response = userService.changePassword(currentpassword, newPassword);
|
||||
const response = await userService.changePassword(currentpassword, newPassword);
|
||||
response
|
||||
.then(() => {
|
||||
toast.success('Password updated successfully', { hideProgressBar: true, autoClose: 3000 });
|
||||
|
|
@ -40,7 +40,7 @@ function SettingsPage(props) {
|
|||
|
||||
const newPasswordKeyPressHandler = async (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
changePassword();
|
||||
await changePassword();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue