mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +09:00
Use an async arrow function for webui rules
Co-authored-by: Hornwitser <github@hornwitser.no>
This commit is contained in:
1 parent
b2daf26e6c
commit
687a384fe4
1 file changed
+2
-7
@@ -392,15 +392,10 @@ function computeTreeData(
|
||||
tooltip={def.description}
|
||||
valuePropName={def.type === "boolean" ? "checked" : "value"}
|
||||
rules={[{
|
||||
validator: function(_, fieldValue) {
|
||||
validator: async (_, fieldValue) => {
|
||||
if (def.extendedValidation) {
|
||||
try {
|
||||
def.extendedValidation(fieldValue, config);
|
||||
} catch (err: any) {
|
||||
return Promise.reject(err);
|
||||
}
|
||||
def.extendedValidation(fieldValue, config);
|
||||
}
|
||||
return Promise.resolve();
|
||||
},
|
||||
}]}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user