mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
error handling levels
This commit is contained in:
@@ -19,6 +19,8 @@ import CONST from '../const';
|
||||
import getLevelFields from './getLevelFields';
|
||||
import {LEVELS} from './index';
|
||||
|
||||
import createError from '../../../../../components/error';
|
||||
|
||||
/** on-change event handler to update level */
|
||||
const updateLevel = (e: Event) => {
|
||||
const target = <HTMLInputElement>e.target;
|
||||
@@ -41,7 +43,7 @@ const updateLevel = (e: Event) => {
|
||||
const updatedLevel = getLevelFields(level);
|
||||
LEVELS.update(updatedLevel, level);
|
||||
} catch (e) {
|
||||
alert(e);
|
||||
createError(e);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user